From c91ce23f668ef265c807521c1d19bb1520fbcfd6 Mon Sep 17 00:00:00 2001 From: A Bunch of Computer Nerds Date: Sun, 8 Dec 2024 20:49:46 -0300 Subject: [PATCH] Fixed shutdown handling --- src/bot.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bot.js b/src/bot.js index cc17137..ba0a6b8 100644 --- a/src/bot.js +++ b/src/bot.js @@ -51,10 +51,8 @@ const startBot = async () => { const handleShutdown = (signal) => { console.log(`Received ${signal}. Stopping bot...`); - bot.stop(signal).then(() => { - console.log('Bot stopped.'); - process.exit(0); - }); + bot.stop(signal); + process.exit(0); }; process.once('SIGINT', () => handleShutdown('SIGINT'));