Bridged WebSocket Events and REST Requests. Now REST Requests will respond exactly like WS Events to data

This commit is contained in:
hydrabolt
2016-04-24 16:30:58 +01:00
parent c42e303b7b
commit 1676a5e73f
12 changed files with 139 additions and 23 deletions

View 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;