From 416b79ca97ab9af6b9ba442272a70d5fbb80b946 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Tue, 1 Jun 2021 12:59:15 -0600 Subject: [PATCH] handle Client error event --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index e1abc9f..bdf4c88 100644 --- a/src/index.js +++ b/src/index.js @@ -67,4 +67,8 @@ bot.on("ready", async () => { } }); +bot.on("error", (err) => { + logger.error("hf:main", "Catching error: " + err); +}); + bot.connect();