mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-02 17:10:08 +00:00
* feat: create base Emoji class for ReactionEmoji and new GuildEmoji * rename EmojiStore to GuildEmojiStore to account for the new class' name
20 lines
530 B
JavaScript
20 lines
530 B
JavaScript
const Action = require('./Action');
|
|
const { Events } = require('../../util/Constants');
|
|
|
|
class GuildEmojiUpdateAction extends Action {
|
|
handle(current, data) {
|
|
const old = current._update(data);
|
|
this.client.emit(Events.GUILD_EMOJI_UPDATE, old, current);
|
|
return { emoji: current };
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Emitted whenever a custom emoji is updated in a guild.
|
|
* @event Client#emojiUpdate
|
|
* @param {GuildEmoji} oldEmoji The old emoji
|
|
* @param {GuildEmoji} newEmoji The new emoji
|
|
*/
|
|
|
|
module.exports = GuildEmojiUpdateAction;
|