Application doesn't respond

I have a problem, every time I make an interaction, whether it's a command or pressing a button it responds to me with: Application doesn't respond. I share with you my 3 reference codes, the config.js and the other files I personally checked and everything is correct, but in those I can't understand where the problem is https://sourceb.in/xp8vrRu91W
3 Replies
d.js toolkit
d.js toolkit4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
duck
duck4mo ago
I don't see where in your interactionCreate event you handle slash command or button interactions, only string select menus
thaferra
thaferraOP4mo ago
client.on('interactionCreate', async interaction => { if (interaction.isCommand()) { const command = client.commands.get(interaction.commandName); if (!command) return; try { await command.execute(interaction); } catch (error) { console.error('Errore durante l'esecuzione del comando:', error); await interaction.reply({ content: 'Si è verificato un errore durante l'esecuzione del comando.', ephemeral: true }); } } // Gestione dei menu a tendina else if (interaction.isStringSelectMenu()) { // (qui va il tuo codice per i menu a tendina) } // Gestione dei pulsanti else if (interaction.isButton()) { if (interaction.customId === 'close_ticket') { const ticketChannel = interaction.channel; try { await ticketChannel.delete(); delete activeTickets[interaction.user.id]; } catch (error) { console.error('Errore durante la chiusura del ticket:', error); await interaction.reply({ content: 'Si è verificato un errore durante la chiusura del ticket.', ephemeral: true }); } } } }); ///// else if (interaction.isButton()) { if (interaction.customId === 'close_ticket') { const ticketChannel = interaction.channel; try { await ticketChannel.delete(); delete activeTickets[interaction.user.id]; } catch (error) { console.error('Errore durante la chiusura del ticket:', error); await interaction.reply({ content: 'Si è verificato un errore durante la chiusura del ticket.', ephemeral: true }); } } } like this? cause I thought it was there, but apparently while I was working on it I must have modified or deleted it, I don't remember i'll try and let you know everything works
Want results from more Discord servers?
Add your server