buddy

node MVC discord bot
Log | Files | Refs | README

GuildEmojiCreate.js (529B)


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