Class
Role
Guild role. Cached in Guild; permissions computed via GuildMember.
Extends Base
Constructor
Properties
client
: Client (readonly)Parent client instance.
color
: numberRole color (24-bit RGB).
guildId
: string (readonly)Guild this role belongs to.
hoist
: booleanWhether this role is hoisted (shown separately in member list).
hoistPosition
: number | nullHoist position (null = not hoisted).
id
: string (readonly)Role snowflake ID.
mentionable
: booleanWhether this role is mentionable.
name
: stringRole name.
permissions
: PermissionsBitField (readonly)Permissions bitfield (Administrator grants all permissions).
position
: numberRole position (higher = above).
unicodeEmoji
: string | nullUnicode emoji for this role (null = none).
Methods
delete
(): Promise<void>DELETE role. Requires Manage Roles.
edit
(options: RoleEditOptions): Promise<Role>PATCH role. Requires Manage Roles.
| Param | Type | Description |
|---|---|---|
| options | RoleEditOptions | CamelCase fields to update |
toString
(): stringFormat as a mention string (`<@&id>`).