diff --git a/src/Client.ts b/src/Client.ts index 2bba305..152c1ad 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -40,10 +40,17 @@ export default class Client extends Eris.Client { displayTimestamp: true, displayFilename: true, }); + this.events(); this.loadFunctions(); this.init(); } + private async events() { + process.on('unhandledRejection', (error) => { + this.signale.error(error); + }); + } + private async loadFunctions() { const functions = await fs.readdir('./functions'); functions.forEach(async (func) => {