Role
- class Role()
A guild role, including its permission bitfield, hierarchy position, and display settings.
exported from
lib.weeble.d- Implements:
Properties
- Role.color
type: readonly number | undefined
24-bit RGB color for this role.
undefinedwhen omitted;0only when Discord sent 0.
- Role.colors
type: readonly
RoleColors| undefinedRole colors. Prefer this over the legacy singular
colorfield.
- Role.hoist
type: readonly boolean | undefined
Indicates whether this role is displayed separately in the member list.
- Role.managed
type: readonly boolean | undefined
Indicates whether this role is managed by an integration.
- Role.mentionable
type: readonly boolean | undefined
Indicates whether this role can be mentioned by anyone.
- Role.position
type: readonly number | undefined
Position in the role hierarchy (higher = higher priority).
- Role.unicodeEmoji
type: readonly string | null | undefined
Unicode emoji displayed as the role icon, or
null.
Methods
- async Role.delete(reason: string) Promise<void>
Delete this role.
- Parameters:
reason — – Reason for deletion, shown in audit log.
-
async Role.edit(options:
RoleEditOptions) Promise<Role> Edit role properties.
- Parameters:
options — – Role properties to update.
- Returns:
The updated role.
-
async Role.getMembers(options:
FetchMembersOptions) Promise<GuildMember[]> Fetch guild members who have this role.