to-do: command/event hotreloading

This commit is contained in:
Emily 2020-10-21 01:03:16 +11:00
parent e34d8cac57
commit 85d0255ccc

View file

@ -63,6 +63,16 @@ class WoomyClient extends Eris.Client {
this.logger.success('COMMAND_LOADER_SUCCESS', `Loaded ${this.commands.size}/${this.commandFiles.length} commands.`);
}
reloadCommands () {
for (const file of this.commandFiles) {
try {
} catch (error) {
}
}
}
loadEventModules () {
const nameRegexp = /[^/]*$/;
const catRegexp = /.+?(?=\/)/;
@ -75,10 +85,20 @@ class WoomyClient extends Eris.Client {
this.logger.error('EVENT_LOADER_ERROR', `Failed to load ${file}: ${error}`);
}
}
console.log(this.eventModules)
this.logger.success('EVENT_LOADER_SUCCESS', `Loaded ${this.eventModules.size}/${this.eventFiles.length} event modules.`);
}
reloadEventModules () {
for (const file of this.eventFiles) {
try {
} catch (error) {
}
}
}
mainEventListener (wsEvent, param_1, param_2) {
try {
this.eventHandler.handle(wsEvent, param_1, param_2);