mirror of
https://github.com/danbulant/discord.js
synced 2026-05-31 05:11:51 +00:00
* feat: create base Emoji class for ReactionEmoji and new GuildEmoji * rename EmojiStore to GuildEmojiStore to account for the new class' name
18 lines
495 B
JavaScript
18 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;
|