feat: Introduce admin webhook and enhanced reload commands with redeploy functionality, implement post-restart notifications, and update Docker container names from Kyoko to Aurora.

This commit is contained in:
syntaxbullet
2025-12-15 22:29:03 +01:00
parent 9333d6ac6c
commit 3acb5304f5
5 changed files with 108 additions and 33 deletions

View File

@@ -8,6 +8,29 @@ const event: Event<Events.ClientReady> = {
execute: async (c) => {
console.log(`Ready! Logged in as ${c.user.tag}`);
schedulerService.start();
// Check for restart context
const { readFile, unlink } = await import("fs/promises");
const { createSuccessEmbed } = await import("@lib/embeds");
try {
const contextData = await readFile(".restart_context.json", "utf-8");
const context = JSON.parse(contextData);
// Validate context freshness (e.g., ignore if older than 5 minutes)
if (Date.now() - context.timestamp < 5 * 60 * 1000) {
const channel = await c.channels.fetch(context.channelId);
if (channel && channel.isSendable()) {
await channel.send({
embeds: [createSuccessEmbed("Bot is back online! Redeploy successful.", "System Online")]
});
}
}
await unlink(".restart_context.json");
} catch (error) {
// Ignore errors (file not found, etc.)
}
},
};