GuildRole

Signature

export interface GuildRole extends DiscordBase, ObjectToLower<Omit<APIRole, 'permissions'>>

Properties

get createdTimestamp(): number;

Create a timestamp for the current object.

get createdAt(): Date;

createdAt gets the creation Date instace of the current object.

icon?: string | null | undefined;
tags?: { botId?: string | undefined; premiumSubscriber?: null | undefined; integrationId?: string | undefined; subscriptionListingId?: string | undefined; availableForPurchase?: null | undefined; guildConnections?: null | undefined; } | undefined;
colors: { primaryColor: number; secondaryColor: number | null; tertiaryColor: number | null; };

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.

delete(reason?: string): Promise<void>;
toString(): `<@&${string}>`;

Returns a string representation of an object.