This commit is contained in:
Erik 2020-04-12 15:35:27 +03:00
parent 260e3215c2
commit aae82e2ed5
2 changed files with 13 additions and 3 deletions

View File

@ -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();
client.build();
process.on("unhandledRejection", (error) => {
console.error("Unhandled promise rejection:", error); //eslint-disable-line no-console
});

View File

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