diff --git a/bot/index.js b/bot/index.js index 7bccbc3..8c0dbde 100644 --- a/bot/index.js +++ b/bot/index.js @@ -145,4 +145,9 @@ process.on('uncaughtException', (error) => { process.on('unhandledRejection', err => { client.logger.error('UNHANDLED_PROMISE_ERROR', err.stack); +}); + +// Shut down gracefully when SIGINT is recieved +process.on('SIGINT', () => { + client.functions.shutdown(); }); \ No newline at end of file