From 3eabf3b3195de2e964a3b09ff03e0f3149b6f609 Mon Sep 17 00:00:00 2001 From: Bsian Date: Tue, 28 Jul 2020 12:52:11 +0100 Subject: [PATCH] Add error event --- src/class/Client.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/class/Client.ts b/src/class/Client.ts index 5e96d72..db791ad 100644 --- a/src/class/Client.ts +++ b/src/class/Client.ts @@ -59,8 +59,11 @@ export default class Client extends Eris.Client { } public async errorEvents() { - process.on('unhandledRejection', (error) => { - this.signale.error(error); + process.on('unhandledRejection', (error: Error) => { + this.util.handleError(error); + }); + this.on('error', (error) => { + this.util.handleError(error); }); }