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()