mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
* feat: create base Emoji class for ReactionEmoji and new GuildEmoji * rename EmojiStore to GuildEmojiStore to account for the new class' name
19 lines
495 B
JavaScript
19 lines
495 B
JavaScript
const Action = require('./Action');
|
|
const { Events } = require('../../util/Constants');
|
|
|
|
class GuildEmojiCreateAction extends Action {
|
|
handle(guild, createdEmoji) {
|
|
const emoji = guild.emojis.add(createdEmoji);
|
|
this.client.emit(Events.GUILD_EMOJI_CREATE, emoji);
|
|
return { emoji };
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Emitted whenever a custom emoji is created in a guild.
|
|
* @event Client#emojiCreate
|
|
* @param {GuildEmoji} emoji The emoji that was created
|
|
*/
|
|
|
|
module.exports = GuildEmojiCreateAction;
|