How to show a modal after a reply?

In this command, the bot reply (ephemeral) to the slash command with a button, how to show a modal when this the user interact with this button? (asking because i received the interaction already replied error using await interaction.showModal() in the component file of the button.
4 Replies
d.js toolkit
d.js toolkit7mo 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
Syjalo
Syjalo7mo ago
Use .showModal() on the button interaction
Massicraft
Massicraft7mo ago
so ButtonInteraction.showModal() ?
Syjalo
Syjalo7mo ago
Yes, if you have defined the interaction as so ButtonInteraction