ActionsManager.js (1780B)
1 'use strict'; 2 3 class ActionsManager { 4 constructor(client) { 5 this.client = client; 6 7 this.register(require('./MessageCreate')); 8 this.register(require('./MessageDelete')); 9 this.register(require('./MessageDeleteBulk')); 10 this.register(require('./MessageUpdate')); 11 this.register(require('./MessageReactionAdd')); 12 this.register(require('./MessageReactionRemove')); 13 this.register(require('./MessageReactionRemoveAll')); 14 this.register(require('./MessageReactionRemoveEmoji')); 15 this.register(require('./ChannelCreate')); 16 this.register(require('./ChannelDelete')); 17 this.register(require('./ChannelUpdate')); 18 this.register(require('./GuildDelete')); 19 this.register(require('./GuildUpdate')); 20 this.register(require('./InviteCreate')); 21 this.register(require('./InviteDelete')); 22 this.register(require('./GuildMemberRemove')); 23 this.register(require('./GuildBanRemove')); 24 this.register(require('./GuildRoleCreate')); 25 this.register(require('./GuildRoleDelete')); 26 this.register(require('./GuildRoleUpdate')); 27 this.register(require('./PresenceUpdate')); 28 this.register(require('./UserUpdate')); 29 this.register(require('./VoiceStateUpdate')); 30 this.register(require('./GuildEmojiCreate')); 31 this.register(require('./GuildEmojiDelete')); 32 this.register(require('./GuildEmojiUpdate')); 33 this.register(require('./GuildEmojisUpdate')); 34 this.register(require('./GuildRolesPositionUpdate')); 35 this.register(require('./GuildChannelsPositionUpdate')); 36 this.register(require('./GuildIntegrationsUpdate')); 37 this.register(require('./WebhooksUpdate')); 38 } 39 40 register(Action) { 41 this[Action.name.replace(/Action$/, '')] = new Action(this.client); 42 } 43 } 44 45 module.exports = ActionsManager;