Merge pull request #23 from AStainlessSteelSink/master

Bind to SIGINT so Ctrl+C properly shuts down the bot
This commit is contained in:
flgx 2021-02-24 08:45:13 +00:00 committed by GitHub
commit 9326a2da3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,4 +97,10 @@ const init = async () => {
}; };
}; };
init(); process.on('SIGINT', function(){
client.logger.info("Disconnecting...")
client.destroy();
process.exit();
});
init();