-
Notifications
You must be signed in to change notification settings - Fork 143
Role
extends Snowflake
Represents a Discord guild role, which is used to assign priority, permissions, and a color to guild members.
Permanently deletes the role. This cannot be undone!
- n: number
Moves a role down its list. The parameter n
indicates how many spaces the
role should be moved, clamped to the lowest position, with a default of 1 if
it is omitted. This will also normalize the positions of all roles. Note that
the default everyone role cannot be moved.
- n: number
Moves a role up its list. The parameter n
indicates how many spaces the
role should be moved, clamped to the highest position, with a default of 1 if
it is omitted. This will also normalize the positions of all roles. Note that
the default everyone role cannot be moved.
- name: string
Sets the role's name. The name must be between 1 and 100 characters in length.
- color: Color Resolveable
Sets the role's display color.
- permissions: Permissions Resolveable
Sets the permissions that this role explicitly allows.
Causes members with this role to display above unhoisted roles in the member list.
Causes member with this role to display amongst other unhoisted members.
Allows anyone to mention this role in text messages.
Disallows anyone to mention this role in text messages.
- ...: Permissions Resolveable(s)
Enables individual permissions for this role. This does not necessarily fully allow the permissions.
- ...: Permissions Resolveable(s)
Disables individual permissions for this role. This does not necessarily fully disallow the permissions.
Enables all permissions for this role. This does not necessarily fully allow the permissions.
Disables all permissions for this role. This does not necessarily fully disallow the permissions.
Returns a color object that represents the role's display color.
Returns a permissions object that represents the permissions that this role has enabled.
Whether members with this role should be shown separated from other members in the guild member list.
Whether this role can be mentioned in a text channel message.
Whether this role is managed by some integration or bot inclusion.
The name of the role. This should be between 1 and 100 characters in length.
The position of the role, where 0 is the lowest.
Represents the display color of the role as a decimal value.
Represents the total permissions of the role as a decimal value.
A string that, when included in a message content, may resolve as a role notification in the official Discord client.
The guild in which this role exists.
A filtered iterable of guild members that have this role. If you want to check
whether a specific member has this role, it would be better to get the member
object elsewhere and use Member:hasRole
rather than check whether the member
exists here.