diff --git a/bot.js b/bot.js index 09cac10..b8e4547 100644 --- a/bot.js +++ b/bot.js @@ -37,6 +37,10 @@ function main() { } }) }); + // log the errors instead of letting the program crash + client.on('error', (err) => { + logger.error(err.message); + }); client.login(authToken).then(() => { logger.debug("Logged in"); });