Edit Interaction Reply
Hey! I have a slash command that replies with an embed message containing button components. How could I edit the reply of the original reply when the button is pressed?
I'd like to avoid using interaction.message.edit() as it can be a pain permission-wise. Is there a way to use interaction.editReply()?
8 Replies
- 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!Use interaction.update
Thanks! And if the button is not on the message I want to edit, is there a way to essentially fetch an interaction and then edit its reply?
you'd have to fetch the message
Hmmm yeah, and that becomes an issue if the bot doesn't have access to the given channel
But if there's no other solution, ty
You can always check whether the bot has access to it - it's best to check those basic access or practical related things to prevent other things in the code you may have missed and let you have more options code-wise
Sounds good, thanks
You could also use interaction.editReply();