why wont this WORK
This commit is contained in:
parent
bfb0eb561d
commit
e345077f9c
2 changed files with 2 additions and 3 deletions
|
@ -9,4 +9,4 @@ class Ready {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = new Ready();
|
||||
module.exports = Ready;
|
|
@ -64,8 +64,7 @@ class WoomyClient extends Eris.Client {
|
|||
|
||||
for (const file of this.eventFiles) {
|
||||
try {
|
||||
const event = require(this.path + '/event_modules/' + file);
|
||||
//event.wsEvent = catRegexp.exec(file);
|
||||
const event = new (require(this.path + '/event_modules/' + file)(catRegexp.exec(file)));
|
||||
this.eventModules.set(nameRegexp.exec(file), event);
|
||||
} catch (error) {
|
||||
this.logger.error('EVENT_LOADER_ERROR', `Failed to load ${file}: ${error}`);
|
||||
|
|
Loading…
Reference in a new issue