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.
readonlycache : Collection<Snowflake, Role>
The cache of items for this manager.
Inherited from: DataManager
emoji : GuildEmoji
The emoji belonging to this manager
guild : Guild
The guild belonging to this manager
readonlyholds : Constructable<Role>
The data structure belonging to this manager.
Inherited from: DataManager
add(roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>) : Promise<GuildEmoji>
roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>
Adds a role (or multiple roles) to the list of roles that can use this emoji.
remove(roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>) : Promise<GuildEmoji>
roleOrRoles: RoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<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
set(roles: readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>) : Promise<GuildEmoji>
roles: readonly RoleResolvable[] | ReadonlyCollection<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);valueOf() : Collection<Snowflake, Role>
Inherited from: DataManager