why wont this WORK

This commit is contained in:
Emily 2020-10-20 23:19:12 +11:00
parent bfb0eb561d
commit e345077f9c
2 changed files with 2 additions and 3 deletions

View file

@ -9,4 +9,4 @@ class Ready {
}
}
module.exports = new Ready();
module.exports = Ready;

View file

@ -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}`);