mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
Base Emoji class for ReactionEmoji and renamed GuildEmoji classes (#2230)
* feat: create base Emoji class for ReactionEmoji and new GuildEmoji * rename EmojiStore to GuildEmojiStore to account for the new class' name
This commit is contained in:
@@ -15,7 +15,7 @@ const UserStore = require('../stores/UserStore');
|
||||
const ChannelStore = require('../stores/ChannelStore');
|
||||
const GuildStore = require('../stores/GuildStore');
|
||||
const ClientPresenceStore = require('../stores/ClientPresenceStore');
|
||||
const EmojiStore = require('../stores/EmojiStore');
|
||||
const GuildEmojiStore = require('../stores/GuildEmojiStore');
|
||||
const { Events, browser } = require('../util/Constants');
|
||||
const DataResolver = require('../util/DataResolver');
|
||||
const { Error, TypeError, RangeError } = require('../errors');
|
||||
@@ -208,11 +208,11 @@ class Client extends BaseClient {
|
||||
|
||||
/**
|
||||
* All custom emojis that the client has access to, mapped by their IDs
|
||||
* @type {EmojiStore<Snowflake, Emoji>}
|
||||
* @type {GuildEmojiStore<Snowflake, GuildEmoji>}
|
||||
* @readonly
|
||||
*/
|
||||
get emojis() {
|
||||
const emojis = new EmojiStore({ client: this });
|
||||
const emojis = new GuildEmojiStore({ client: this });
|
||||
for (const guild of this.guilds.values()) {
|
||||
if (guild.available) for (const emoji of guild.emojis.values()) emojis.set(emoji.id, emoji);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user