logging change

This commit is contained in:
Emily 2020-10-20 21:22:50 +11:00
parent 14bd0ab8e3
commit 1d90965162

View file

@ -51,7 +51,7 @@ class WoomyClient extends Eris.Client {
this.aliases.set(alias, props.help.name); this.aliases.set(alias, props.help.name);
}); });
} catch (error) { } catch (error) {
this.logger.error('COMMAND_LOADER_ERROR', error); this.logger.error('COMMAND_LOADER_ERROR', `Failed to load ${file}: ${error}`);
} }
} }
@ -65,10 +65,10 @@ class WoomyClient extends Eris.Client {
for (const file of this.eventFiles) { for (const file of this.eventFiles) {
try { try {
const event = require(this.path + '/event_modules/' + file); const event = require(this.path + '/event_modules/' + file);
event.wsEvent = catRegexp.exec(file); //event.wsEvent = catRegexp.exec(file);
this.eventModules.set(nameRegexp.exec(file), event); this.eventModules.set(nameRegexp.exec(file), event);
} catch (error) { } catch (error) {
this.logger.error('EVENT_LOADER_ERROR', error); this.logger.error('EVENT_LOADER_ERROR', `Failed to load ${file}: ${error}`);
} }
} }