summaryrefslogtreecommitdiff
path: root/node_modules/discord.js/src/client/actions/GuildEmojiUpdate.js
blob: 6bf96579e81fc7ea127f26e2c8d772b491c4098d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict';

const Action = require('./Action');
const Events = require('../../util/Events');

class GuildEmojiUpdateAction extends Action {
  handle(current, data) {
    const old = current._update(data);
    /**
     * 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
     */
    this.client.emit(Events.GuildEmojiUpdate, old, current);
    return { emoji: current };
  }
}

module.exports = GuildEmojiUpdateAction;