Represents a role on Discord.
The base 10 color of the role
The time the role was created at
The timestamp the role was created at
Whether the role is editable by the client user
The flags of this role
The guild that the role belongs to
The hexadecimal version of the role color, with a leading hashtag
If true, users that are part of this role will appear in a separate category in the users list
The role's id (unique to the guild it is part of)
Whether or not the role is managed by an external service
Whether or not the role can be mentioned by anyone
The name of the role
The position of the role in the role manager
The raw position of the role from the API
Compares this role's position to another role's.
ReturnsNegative number if this role's position is lower (other role's is higher), positive number if this one is higher (other's is lower), 0 if equal
|role||RoleResolvable||No||Role to compare to this one|
Deletes the role.
|reason||string||Yes||Reason for deleting this role|
Edits the role.
|options||RoleEditOptions||No||The options to provide|
Whether this role equals another role. It compares all properties, so for most operations it is advisable to just compare
role.id === role2.idas it is much faster and is often what most users need.
|role||Role||No||Role to compare with|
A link to the role's icon
|options||ImageURLOptions||Yes||Options for the image URL|
channel.permissionsFor(role). Returns permissions for a role in a guild channel, taking into account permission overwrites.
Sets a new color for the role.
Sets whether or not the role should be hoisted.
Sets a new icon for the role.
Sets whether this role is mentionable.
Sets a new name for the role.
Sets the permissions of the role.
Sets the new position of the role.
Sets a new unicode emoji for the role.
When concatenated with a string, this automatically returns the role's mention instead of the Role object.