class GuildEmojiRoleManager
extends
DataManager<Snowflake, Role, RoleResolvable>export class GuildEmojiRoleManager extends DataManager<Snowflake, Role, RoleResolvable>
Manages API methods for roles belonging to emojis and stores their cache.
readonlyCollection<Snowflake, Role> cache :
The cache of roles belonging to this emoji
readonlyClient client :
The client that instantiated this Manager
GuildEmoji emoji :
The emoji belonging to this manager
Guild guild :
The guild belonging to this manager
readonlyConstructable<Role> holds :
The data structure belonging to this manager.
Inherited from: DataManager
addroleOrRoles: RoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role>) : Promise<GuildEmoji> (
roleOrRoles: RoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role>
Adds a role (or multiple roles) to the list of roles that can use this emoji.
removeroleOrRoles: RoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role>) : Promise<GuildEmoji> (
roleOrRoles: RoleResolvable | readonly RoleResolvable[] | Collection<Snowflake, Role>
Removes a role (or multiple roles) from the list of roles that can use this emoji.
Overload 1
Overload 2
Overload 1
Overload 2
setroles: readonly RoleResolvable[] | Collection<Snowflake, Role>) : Promise<GuildEmoji> (
roles: readonly RoleResolvable[] | Collection<Snowflake, Role>
Sets the role(s) that can use this emoji.
Examples:
// Set the emoji's roles to a single role
guildEmoji.roles.set(['391156570408615936'])
.then(console.log)
.catch(console.error);
// Remove all roles from an emoji
guildEmoji.roles.set([])
.then(console.log)
.catch(console.error);
valueOfCollection<Snowflake, Role> () :
Inherited from: DataManager