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:
SpaceEEC
2018-01-18 09:38:45 +01:00
committed by Isabella
parent b846cbd2b3
commit aa3407f705
15 changed files with 264 additions and 278 deletions

View File

@@ -10,7 +10,7 @@ const Snowflake = require('../util/Snowflake');
const Shared = require('./shared');
const GuildMemberStore = require('../stores/GuildMemberStore');
const RoleStore = require('../stores/RoleStore');
const EmojiStore = require('../stores/EmojiStore');
const GuildEmojiStore = require('../stores/GuildEmojiStore');
const GuildChannelStore = require('../stores/GuildChannelStore');
const PresenceStore = require('../stores/PresenceStore');
const Base = require('./Base');
@@ -218,9 +218,9 @@ class Guild extends Base {
if (!this.emojis) {
/**
* A collection of emojis that are in this guild. The key is the emoji's ID, the value is the emoji.
* @type {EmojiStore<Snowflake, Emoji>}
* @type {GuildEmojiStore<Snowflake, GuildEmoji>}
*/
this.emojis = new EmojiStore(this);
this.emojis = new GuildEmojiStore(this);
if (data.emojis) for (const emoji of data.emojis) this.emojis.add(emoji);
} else {
this.client.actions.GuildEmojisUpdate.handle({