diff --git a/bot.js b/bot.js old mode 100755 new mode 100644 index 5e33117..2e058b3 --- a/bot.js +++ b/bot.js @@ -12,13 +12,10 @@ const client = new Client( { intents: [GatewayIntentBits.Guilds, GatewayIntentBi // Define Sigtrap Callback for clean shutdowns function signalExit(signal) { console.log(`\tCaught ${signal}`); - // Signal via discord that we are closing - client.channels.fetch("860393205401255936") - .then(papi => papi.send('bye bye papi') ) - // then disconnect - .then( client.destroy() - // and when that is done finally exit - .then( process.exit(0) ) ); + // Close the client cleanly + client.destroy(); + // And exit cleanly + process.exit(0); } // Subscribe to a few signal events process.on('SIGINT', signalExit); // For Ctrl-C when running in a TTY