|
|
@ -19,7 +19,10 @@ initLocalCommands();
|
|
|
|
initCommands();
|
|
|
|
initCommands();
|
|
|
|
initAIs();
|
|
|
|
initAIs();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let hasSent = false
|
|
|
|
|
|
|
|
|
|
|
|
await BotEmitter.on("ready", (bot) => {
|
|
|
|
await BotEmitter.on("ready", (bot) => {
|
|
|
|
|
|
|
|
if (hasSent) return
|
|
|
|
Deno.addSignalListener("SIGINT", () => {
|
|
|
|
Deno.addSignalListener("SIGINT", () => {
|
|
|
|
config.discord.channels.forEach(async channelId => {
|
|
|
|
config.discord.channels.forEach(async channelId => {
|
|
|
|
await sendMessage(bot, channelId, {
|
|
|
|
await sendMessage(bot, channelId, {
|
|
|
@ -32,6 +35,7 @@ await BotEmitter.on("ready", (bot) => {
|
|
|
|
content: "The bot is back online!"
|
|
|
|
content: "The bot is back online!"
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
hasSent = true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
await BotEmitter.emit("start", {
|
|
|
|
await BotEmitter.emit("start", {
|
|
|
|