GuildMemberRoleManager

export class GuildMemberRoleManager extends DataManager<Snowflake, Role, RoleResolvable>
export class GuildMemberRoleManager extends DataManager<Snowflake, Role, RoleResolvable>
Manages API methods for roles of a GuildMember and stores their cache.
Readonly
botRole:Role | null
The managed role this member created when joining the guild, if any Only ever available on bots
Readonly
cache:Collection<K, Holds>
The cache of items for this manager.
Inherited from DataManager
Readonly
client:Client
The client that instantiated this Manager
Inherited from BaseManager
Readonly
color:Role | null
The role of the member used to set their color
guild:Guild
The Guild this manager belongs to
Readonly
highest:Role
The role of the member with the highest position
Readonly
hoist:Role | null
The role of the member used to hoist them in a separate category in the users list
Readonly
holds:Constructable<Holds>
The data structure belonging to this manager.
Inherited from DataManager
Readonly
icon:Role | null
The role of the member used to set their role icon
The GuildMember this manager belongs to
Readonly
premiumSubscriberRole:Role | null
The premium subscriber role of the guild, if present on the member
add(roleOrRoles, reason?):Promise<GuildMember>
Adds a role (or multiple roles) to the member.
NameTypeOptionalDescription
roleOrRolesRoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role>NoThe role or roles to add
reasonstringYesReason for adding the role(s)
remove(roleOrRoles, reason?):Promise<GuildMember>
Removes a role (or multiple roles) from the member.
NameTypeOptionalDescription
roleOrRolesRoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role>NoThe role or roles to remove
reasonstringYesReason for removing the role(s)
resolve(idOrInstance):Holds
Resolves a data entry to a data Object.
Returns
An instance from this Manager
NameTypeOptionalDescription
idOrInstanceHoldsNoThe id or instance of something in this Manager
resolveId(idOrInstance):K
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceK | HoldsNoThe id or instance of something in this Manager
set(roles, reason?):Promise<GuildMember>
Sets the roles applied to the member.
NameTypeOptionalDescription
rolesreadonly RoleResolvable[] | Collection<Snowflake, Role>NoThe roles or role ids to apply
reasonstringYesReason for applying the roles
valueOf():Collection<K, Holds>