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", {