Creates a new Role instance.
The server this role belongs to.
The raw data for the role from the API.
Optional
colour?: null | stringOptional
hoist?: booleanFormat: int64
Format: int64
Optional
rank?: numberFormat: int64
Readonly
clientThe client instance.
The color of the role, or null
if no color is set.
Whether the role is displayed separately in the member list.
The unique identifier for the object.
The name of the role.
The permissions overwrite for the role.
The rank of the role, used for ordering.
The server this role belongs to.
Gets the timestamp of when the role was created.
The creation timestamp of the role in milliseconds.
Gets the permissions overwrite for the role.
The permissions overwrite for the role.
Creates a deep clone of the object.
A clone of the object.
Updates the object with new data and returns a clone of the object.
The data to update the object with.
Optional
clear: string[]Fields to clear in the object.
A clone of the updated object.
Deletes the role from the server.
A promise that resolves when the role is deleted.
Compares this object with another to determine if they are equal.
Optional
obj: null | RoleThe object to compare with.
true
if the objects are equal, otherwise false
.
Converts the role to a string representation.
A string representation of the role in the format <@&roleId>
.
Represents a role in a server.