mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
Bridged WebSocket Events and REST Requests. Now REST Requests will respond exactly like WS Events to data
This commit is contained in:
19
src/client/actions/ActionsManager.js
Normal file
19
src/client/actions/ActionsManager.js
Normal file
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
const requireAction = name => require(`./${name}`);
|
||||
|
||||
class ActionsManager {
|
||||
constructor(client) {
|
||||
this.client = client;
|
||||
|
||||
this.register('MessageCreate');
|
||||
this.register('MessageDelete');
|
||||
}
|
||||
|
||||
register(name) {
|
||||
let Action = requireAction(name);
|
||||
this[name] = new Action(this.client);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ActionsManager;
|
||||
Reference in New Issue
Block a user