feat: implement graceful shutdown handling

This commit is contained in:
syntaxbullet
2026-01-06 17:21:50 +01:00
parent 278ef4b6b0
commit 6ead0c0393
8 changed files with 190 additions and 6 deletions

View File

@@ -11,4 +11,8 @@ await AuroraClient.deployCommands();
if (!env.DISCORD_BOT_TOKEN) {
throw new Error("❌ DISCORD_BOT_TOKEN is not set in environment variables.");
}
AuroraClient.login(env.DISCORD_BOT_TOKEN);
AuroraClient.login(env.DISCORD_BOT_TOKEN);
// Handle graceful shutdown
process.on("SIGINT", () => AuroraClient.shutdown());
process.on("SIGTERM", () => AuroraClient.shutdown());