mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-01 08:30:08 +00:00
21 lines
378 B
JavaScript
21 lines
378 B
JavaScript
'use strict';
|
|
|
|
const requireAction = name => require(`./${name}`);
|
|
|
|
class ActionsManager {
|
|
constructor(client) {
|
|
this.client = client;
|
|
|
|
this.register('MessageCreate');
|
|
this.register('MessageDelete');
|
|
this.register('MessageUpdate');
|
|
}
|
|
|
|
register(name) {
|
|
let Action = requireAction(name);
|
|
this[name] = new Action(this.client);
|
|
}
|
|
}
|
|
|
|
module.exports = ActionsManager;
|