From f1d1b916e5a27e538bf0861697242d762011319e Mon Sep 17 00:00:00 2001 From: sirpiglr <49359077-sirpiglr@users.noreply.replit.com> Date: Mon, 8 Dec 2025 03:15:51 +0000 Subject: [PATCH] Add debugging logs to track bot interactions and commands Adds console logs to the interaction handler to capture details about received interactions and the execution status of commands. Replit-Commit-Author: Agent Replit-Commit-Session-Id: aed2e46d-25bb-4b73-81a1-bb9e8437c261 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 4b9f25d1-45f3-48e0-a4f7-ab9987bf3955 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/aed2e46d-25bb-4b73-81a1-bb9e8437c261/BBAQobO Replit-Helium-Checkpoint-Created: true --- aethex-bot/bot.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aethex-bot/bot.js b/aethex-bot/bot.js index 7e2b7cd..438473c 100644 --- a/aethex-bot/bot.js +++ b/aethex-bot/bot.js @@ -253,7 +253,10 @@ try { // ============================================================================= client.on("interactionCreate", async (interaction) => { + console.log(`[Interaction] Received: type=${interaction.type}, commandName=${interaction.commandName || 'N/A'}, user=${interaction.user?.tag}, guild=${interaction.guildId}`); + if (interaction.isChatInputCommand()) { + console.log(`[Command] Processing: ${interaction.commandName}`); const command = client.commands.get(interaction.commandName); if (!command) { console.warn(`No command matching ${interaction.commandName} was found.`); @@ -261,7 +264,9 @@ client.on("interactionCreate", async (interaction) => { } try { + console.log(`[Command] Executing: ${interaction.commandName}`); await command.execute(interaction, supabase, client); + console.log(`[Command] Completed: ${interaction.commandName}`); } catch (error) { console.error(`Error executing ${interaction.commandName}:`, error); const errorEmbed = new EmbedBuilder()