feat: joel may sometimes answer even when he's not called for.
This commit is contained in:
@@ -16,6 +16,7 @@ import { BotClient } from "./core/client";
|
||||
import { config } from "./core/config";
|
||||
import { createLogger } from "./core/logger";
|
||||
import { registerEvents } from "./events";
|
||||
import { stopSpontaneousMentionsCron } from "./features/joel";
|
||||
import { startWebServer } from "./web";
|
||||
|
||||
const logger = createLogger("Main");
|
||||
@@ -55,12 +56,14 @@ async function main(): Promise<void> {
|
||||
// Handle graceful shutdown
|
||||
process.on("SIGINT", () => {
|
||||
logger.info("Shutting down...");
|
||||
stopSpontaneousMentionsCron();
|
||||
client.destroy();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
process.on("SIGTERM", () => {
|
||||
logger.info("Shutting down...");
|
||||
stopSpontaneousMentionsCron();
|
||||
client.destroy();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user