Preview environment

class GuildEmojiRoleManager

export class GuildEmojiRoleManager extends DataManager<Snowflake, Role, RoleResolvable>

Manages API methods for roles belonging to emojis and stores their cache.

readonly
cache : Collection<Snowflake, Role>

The cache of items for this manager.

Inherited from: DataManager

readonly
client : Client

The client that instantiated this Manager

Inherited from: BaseManager

emoji : GuildEmoji

The emoji belonging to this manager

guild : Guild

The guild belonging to this manager

readonly
holds : Constructable<Role>

The data structure belonging to this manager.

Inherited from: DataManager

Adds a role (or multiple roles) to the list of roles that can use this emoji.

Removes a role (or multiple roles) from the list of roles that can use this emoji.

resolve(
idOrInstance: Holds
) : Holds

Resolves a data entry to a data Object.

Returns: An instance from this Manager

resolveId(
idOrInstance: Key | Holds
) : Key

Resolves a data entry to an instance id.

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