Add bind to SIGINT

This commit is contained in:
Lucian 2021-02-23 12:58:40 -08:00 committed by GitHub
parent 8058f3dced
commit 0f587bcfff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

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