Files
discord.js/src/client/actions/GuildEmojiDelete.js
SpaceEEC aa3407f705 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
2018-01-18 02:38:45 -06:00

19 lines
472 B
JavaScript

const Action = require('./Action');
const { Events } = require('../../util/Constants');
class GuildEmojiDeleteAction extends Action {
handle(emoji) {
emoji.guild.emojis.remove(emoji.id);
this.client.emit(Events.GUILD_EMOJI_DELETE, emoji);
return { emoji };
}
}
/**
* Emitted whenever a custom emoji is deleted in a guild.
* @event Client#emojiDelete
* @param {GuildEmoji} emoji The emoji that was deleted
*/
module.exports = GuildEmojiDeleteAction;