From 233f078a469643ec8c3ddc67f56bff0952a08ec2 Mon Sep 17 00:00:00 2001 From: Ruthenic Date: Tue, 18 Oct 2022 21:26:29 -0400 Subject: [PATCH] i have to test in prod because :skull: --- src/bot.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bot.ts b/src/bot.ts index 11b59a9..7203ff1 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -19,7 +19,10 @@ initLocalCommands(); initCommands(); initAIs(); +let hasSent = false + await BotEmitter.on("ready", (bot) => { + if (hasSent) return Deno.addSignalListener("SIGINT", () => { config.discord.channels.forEach(async channelId => { await sendMessage(bot, channelId, { @@ -32,6 +35,7 @@ await BotEmitter.on("ready", (bot) => { content: "The bot is back online!" }) }) + hasSent = true }) await BotEmitter.emit("start", {