GuildEmojiRoleManager

export 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.
Readonly
The cache of items for this manager.
Inherited from DataManager
Readonly
client:Client
The client that instantiated this Manager
Inherited from BaseManager
The emoji belonging to this manager
guild:Guild
The guild belonging to this manager
Readonly
The data structure belonging to this manager.
Inherited from DataManager
add(roleOrRoles):Promise<GuildEmoji>
Adds a role (or multiple roles) to the list of roles that can use this emoji.
NameTypeOptionalDescription
roleOrRolesRoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>NoThe role or roles to add
remove(roleOrRoles):Promise<GuildEmoji>
Removes a role (or multiple roles) from the list of roles that can use this emoji.
NameTypeOptionalDescription
roleOrRolesRoleResolvable | readonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>NoThe role or roles to remove
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):Key
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceKey | HoldsNoThe id or instance of something in this Manager
set(roles):Promise<GuildEmoji>
Sets the role(s) that can use this emoji.
Example
// Set the emoji's roles to a single role
guildEmoji.roles.set(['391156570408615936'])
.then(console.log)
.catch(console.error);
// Set the emoji's roles to a single role
guildEmoji.roles.set(['391156570408615936'])
.then(console.log)
.catch(console.error);
Example
// Remove all roles from an emoji
guildEmoji.roles.set([])
.then(console.log)
.catch(console.error);
// Remove all roles from an emoji
guildEmoji.roles.set([])
.then(console.log)
.catch(console.error);
NameTypeOptionalDescription
rolesreadonly RoleResolvable[] | ReadonlyCollection<Snowflake, Role>NoThe roles or role ids to apply