Class

Role

Guild role. Cached in guild.roles; permissions computed via member.permissions.

Extends Base

Constructor

new Role(client: Client, data: APIRole, guildId: string)
client
Client
guildId
string

Properties

NameTypeDescription
clientread-onlyClientParent client instance.
colornumberRole color (24-bit RGB).
createdAtread-onlyDateDate when this role was created, derived from its snowflake ID.
createdTimestampread-onlynumberUnix timestamp (ms) when this role was created, derived from its snowflake ID.
guildIdread-onlystringGuild this role belongs to.
hoistbooleanWhether this role is hoisted (shown separately in member list).
hoistPositionnumber | nullHoist position (null = not hoisted).
idread-onlystringRole snowflake ID.
mentionablebooleanWhether this role is mentionable.
namestringRole name.
permissionsread-onlyPermissionsBitFieldPermissions bitfield (Administrator grants all permissions).
positionnumberRole position (higher = above).
unicodeEmojistring | nullUnicode emoji for this role (null = none).

Methods

.delete()

→ Promise<void>

DELETE role. Requires Manage Roles.

await role.delete();