Optional
iconOptional
tagsOptional
unicodeCreates a new role in the guild with the specified options.
This function accepts either a RolePayload
instance or a plain options object to create and send a role creation request.
It validates the options, prepares the payload, and then sends the request to create the role.
Finally, it returns a promise that resolves to the newly created role's data.
The role creation options, which can be an instance of RolePayload
or a plain object with role data.
A promise that resolves to the newly created Role instance.
Deletes the specified role from the guild.
This method sends a request to the Discord API to permanently delete a role identified by its ID within the guild. Once deleted, the role cannot be recovered, and users assigned to this role will lose all permissions associated with it.
A promise that resolves when the role has been successfully deleted.
Edits the properties of the role with the specified options.
This method sends a request to the Discord API to update the role's attributes identified by its ID within the guild. The updated role data will be reflected in the current instance after the operation is successful.
The options for editing the role, which can be an
instance of RolePayload
or a plain object with role data.
A promise that resolves to the updated Role instance.
Represents a role of the guild.