buddy

node MVC discord bot
Log | Files | Refs | README

GuildEmojiDelete.js (538B)


      1 'use strict';
      2 
      3 const Action = require('./Action');
      4 const { Events } = require('../../util/Constants');
      5 
      6 class GuildEmojiDeleteAction extends Action {
      7   handle(emoji) {
      8     emoji.guild.emojis.cache.delete(emoji.id);
      9     emoji.deleted = true;
     10     /**
     11      * Emitted whenever a custom emoji is deleted in a guild.
     12      * @event Client#emojiDelete
     13      * @param {GuildEmoji} emoji The emoji that was deleted
     14      */
     15     this.client.emit(Events.GUILD_EMOJI_DELETE, emoji);
     16     return { emoji };
     17   }
     18 }
     19 
     20 module.exports = GuildEmojiDeleteAction;