mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
feat: add support for role icons (#6633)
This commit is contained in:
11
typings/index.d.ts
vendored
11
typings/index.d.ts
vendored
@@ -1647,16 +1647,21 @@ export class Role extends Base {
|
||||
public rawPosition: number;
|
||||
public tags: RoleTagData | null;
|
||||
public comparePositionTo(role: RoleResolvable): number;
|
||||
public icon: string | null;
|
||||
public unicodeEmoji: string | null;
|
||||
public delete(reason?: string): Promise<Role>;
|
||||
public edit(data: RoleData, reason?: string): Promise<Role>;
|
||||
public equals(role: Role): boolean;
|
||||
public iconURL(options?: StaticImageURLOptions): string | null;
|
||||
public permissionsIn(channel: GuildChannel | Snowflake): Readonly<Permissions>;
|
||||
public setColor(color: ColorResolvable, reason?: string): Promise<Role>;
|
||||
public setHoist(hoist?: boolean, reason?: string): Promise<Role>;
|
||||
public setMentionable(mentionable?: boolean, reason?: string): Promise<Role>;
|
||||
public setName(name: string, reason?: string): Promise<Role>;
|
||||
public setPermissions(permissions: PermissionResolvable, reason?: string): Promise<Role>;
|
||||
public setIcon(icon: BufferResolvable | Base64Resolvable | EmojiResolvable | null, reason?: string): Promise<Role>;
|
||||
public setPosition(position: number, options?: SetRolePositionOptions): Promise<Role>;
|
||||
public setUnicodeEmoji(unicodeEmoji: string | null, reason?: string): Promise<Role>;
|
||||
public toJSON(): unknown;
|
||||
public toString(): RoleMention;
|
||||
|
||||
@@ -2362,6 +2367,7 @@ export const Constants: {
|
||||
{ format, size }: { format: AllowedImageFormat; size: AllowedImageSize },
|
||||
) => string;
|
||||
Sticker: (stickerId: Snowflake, stickerFormat: StickerFormatType) => string;
|
||||
RoleIcon: (roleId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
};
|
||||
};
|
||||
WSCodes: {
|
||||
@@ -4069,7 +4075,8 @@ export type GuildFeatures =
|
||||
| 'MORE_STICKERS'
|
||||
| 'THREE_DAY_THREAD_ARCHIVE'
|
||||
| 'SEVEN_DAY_THREAD_ARCHIVE'
|
||||
| 'PRIVATE_THREADS';
|
||||
| 'PRIVATE_THREADS'
|
||||
| 'ROLE_ICONS';
|
||||
|
||||
export interface GuildMemberEditData {
|
||||
nick?: string | null;
|
||||
@@ -4740,6 +4747,8 @@ export interface RoleData {
|
||||
position?: number;
|
||||
permissions?: PermissionResolvable;
|
||||
mentionable?: boolean;
|
||||
icon?: BufferResolvable | Base64Resolvable | EmojiResolvable | null;
|
||||
unicodeEmoji?: string | null;
|
||||
}
|
||||
|
||||
export type RoleMention = '@everyone' | `<@&${Snowflake}>`;
|
||||
|
||||
Reference in New Issue
Block a user