better exit handles
All checks were successful
PR Check / lint-and-format (pull_request) Successful in 25s

This commit is contained in:
Mylloon 2024-11-02 16:50:05 +01:00
parent 1a0a2ddb8a
commit 9f39a4195d
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -61,11 +61,11 @@ export const run = async (isDev: boolean) => {
console.log(logStart(client_name, true));
console.log(`Botanique "${client.user?.username}" v${client.config.version} started!`);
// ^C
process.on("SIGINT", () => quit(client));
// Container force closed
process.on("SIGTERM", () => quit(client));
// Handle quit
process.on("exit", () => quit(client));
process.on("SIGHUP", () => process.exit(128 + 1));
process.on("SIGINT", () => process.exit(128 + 2));
process.on("SIGTERM", () => process.exit(128 + 15));
})
.catch((err) => {
console.error(err);