GuildRole
Signature
export interface GuildRole extends DiscordBase, ObjectToLower<Omit<APIRole, 'permissions'>>Properties
17Methods
6Properties
readonly guildId: string;permissions: PermissionsBitField;id: string;createdTimestampGetterget createdTimestamp(): number;Create a timestamp for the current object.
createdAtGetterget createdAt(): Date;createdAt gets the creation Date instace of the current object.
readonly client: UsingClient;flags: RoleFlags;name: string;position: number;icon?: string | null | undefined;tags?: { botId?: string | undefined; premiumSubscriber?: null | undefined; integrationId?: string | undefined; subscriptionListingId?: string | undefined; availableForPurchase?: null | undefined; guildConnections?: null | undefined; } | undefined;managed: boolean;color: number;colors: { primaryColor: number; secondaryColor: number | null; tertiaryColor: number | null; };hoist: boolean;unicodeEmoji?: string | null | undefined;mentionable: boolean;Methods
comparePositionTo(role: Pick<APIRole, 'id' | 'position'>): number;Compares this role's hierarchy position with another role.
Returns
A positive number when this role is higher, a negative number when the other role is higher, or 0 when both roles have the same position and ID.
guild(mode?: 'rest' | 'flow'): Promise<GuildStructure<'cached' | 'api'>>;guild(mode: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;fetch(force?: boolean): Promise<GuildRoleStructure>;edit(body: RESTPatchAPIGuildRoleJSONBody, reason?: string): Promise<GuildRoleStructure>;delete(reason?: string): Promise<void>;toString(): `<@&${string}>`;Returns a string representation of an object.