Files
discord.js/src/client/actions/ActionsManager.js
Schuyler Cebulskie 0b908f5bce Cleanup Part 2: Electric Boogaloo (Reloaded) (#594)
* Cleanup Part 2: Electric Boogaloo (Reloaded)

* Moar cleanup

* Tweak NOT_A_PERMISSION error
2016-09-04 10:08:09 +01:00

31 lines
831 B
JavaScript

class ActionsManager {
constructor(client) {
this.client = client;
this.register('MessageCreate');
this.register('MessageDelete');
this.register('MessageDeleteBulk');
this.register('MessageUpdate');
this.register('ChannelCreate');
this.register('ChannelDelete');
this.register('ChannelUpdate');
this.register('GuildDelete');
this.register('GuildUpdate');
this.register('GuildMemberRemove');
this.register('GuildBanRemove');
this.register('GuildRoleCreate');
this.register('GuildRoleDelete');
this.register('GuildRoleUpdate');
this.register('UserGet');
this.register('UserUpdate');
this.register('GuildSync');
}
register(name) {
const Action = require(`./${name}`);
this[name] = new Action(this.client);
}
}
module.exports = ActionsManager;