Manages API methods for roles of a GuildMember and stores their cache.
Extends
DataManager<Snowflake, Role, RoleResolvable>The managed role this member created when joining the guild, if any Only ever available on bots
The role of the member used to hoist them in a separate category in the users list
The data structure belonging to this manager.
Inherited from DataManagerAdds a role (or multiple roles) to the member.
Name | Type | Optional | Description |
---|---|---|---|
roleOrRoles | RoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role> | No | The role or roles to add |
reason | string | Yes | Reason for adding the role(s) |
Removes a role (or multiple roles) from the member.
Name | Type | Optional | Description |
---|---|---|---|
roleOrRoles | RoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role> | No | The role or roles to remove |
reason | string | Yes | Reason for removing the role(s) |
Resolves a data entry to a data Object.
Returns
An instance from this ManagerName | Type | Optional | Description |
---|---|---|---|
idOrInstance | Holds | No | The id or instance of something in this Manager |
Resolves a data entry to an instance id.
Returns
Name | Type | Optional | Description |
---|---|---|---|
idOrInstance | Key | Holds | No | The id or instance of something in this Manager |
Sets the roles applied to the member.
Example
Example
Name | Type | Optional | Description |
---|---|---|---|
roles | readonly RoleResolvable[] | Collection<Snowflake, Role> | No | The roles or role ids to apply |
reason | string | Yes | Reason for applying the roles |