GuildEmojiUpdate.js (568B)
1 'use strict'; 2 3 const Action = require('./Action'); 4 const { Events } = require('../../util/Constants'); 5 6 class GuildEmojiUpdateAction extends Action { 7 handle(current, data) { 8 const old = current._update(data); 9 /** 10 * Emitted whenever a custom emoji is updated in a guild. 11 * @event Client#emojiUpdate 12 * @param {GuildEmoji} oldEmoji The old emoji 13 * @param {GuildEmoji} newEmoji The new emoji 14 */ 15 this.client.emit(Events.GUILD_EMOJI_UPDATE, old, current); 16 return { emoji: current }; 17 } 18 } 19 20 module.exports = GuildEmojiUpdateAction;