From b6c1a9b10d239e9778ddb21b9db61e31c2efe17d Mon Sep 17 00:00:00 2001 From: Eartharoid Date: Sat, 4 May 2019 17:46:53 +0100 Subject: [PATCH] Update index.js --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index f979102..c54371c 100644 --- a/index.js +++ b/index.js @@ -246,6 +246,10 @@ client.on('message', async message => { } }); +client.on('error', error => { + console.log(leeks.colors.bgYellow(leeks.colors.black(`[WARN] Potential error detected\n(likely Discord API connection issue)`))); + console.error(leeks.colors.red(`[ERROR] Client error:\n${error}`)); +}); process.on('unhandledRejection', error => { console.log(leeks.colors.yellow(leeks.styles.bold(`[WARN] An error was not caught`)));