diff --git a/structure/client/DiscordClient.js b/structure/client/DiscordClient.js index 3d51002..4070f4c 100644 --- a/structure/client/DiscordClient.js +++ b/structure/client/DiscordClient.js @@ -43,6 +43,14 @@ class DiscordClient extends Client { this._built = true; + this.on('ready', () => { + console.log('Client websocket is ready.'); + }); + + this.registry.on('componentUpdate', (comp, type) => { + console.log(`[registry][${type}] ${comp.resolveable}`) + }); + console.log('Client built'); } @@ -54,4 +62,8 @@ class DiscordClient extends Client { module.exports = DiscordClient; const client = new DiscordClient(options); -client.build(); \ No newline at end of file +client.build(); + +process.on("unhandledRejection", (error) => { + console.error("Unhandled promise rejection:", error); //eslint-disable-line no-console +}); \ No newline at end of file diff --git a/structure/client/Registry.js b/structure/client/Registry.js index d4fde57..a86e3db 100644 --- a/structure/client/Registry.js +++ b/structure/client/Registry.js @@ -56,8 +56,6 @@ class Registry extends EventEmitter { return null; } - console.log(directory); - if(directory) component.directory = directory; if(component.module && typeof component.module === 'string') { //Sets modules or "groups" for each component, specified by their properties. let module = this.components.get(`module:${component.module}`);