diff --git a/.replit b/.replit index b6adb4e..5b6f647 100644 --- a/.replit +++ b/.replit @@ -22,10 +22,6 @@ externalPort = 80 localPort = 8080 externalPort = 8080 -[[ports]] -localPort = 37193 -externalPort = 3000 - [workflows] runButton = "Project" diff --git a/aethex-bot/bot.js b/aethex-bot/bot.js index 87fc275..7e2b7cd 100644 --- a/aethex-bot/bot.js +++ b/aethex-bot/bot.js @@ -881,10 +881,18 @@ client.login(token).catch((error) => { process.exit(1); }); -client.once("clientReady", () => { +client.once("ready", async () => { console.log(`Bot logged in as ${client.user.tag}`); console.log(`Watching ${client.guilds.cache.size} server(s)`); - console.log("Commands are registered via: npm run register-commands"); + + // Auto-register commands on startup + console.log("Registering slash commands with Discord..."); + const regResult = await registerDiscordCommands(); + if (regResult.success) { + console.log(`Successfully registered ${regResult.count} commands`); + } else { + console.error("Failed to register commands:", regResult.error); + } client.user.setActivity("Protecting the Federation", { type: 3 });