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
d.js toolkit
d.js toolkit5mo 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!
treble/luna
treble/luna5mo ago
Use interaction.update
Barnuss
BarnussOP5mo ago
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?
treble/luna
treble/luna5mo ago
you'd have to fetch the message
Barnuss
BarnussOP5mo ago
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
florentine
florentine5mo ago
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
Barnuss
BarnussOP5mo ago
Sounds good, thanks
Linix
Linix5mo ago
You could also use interaction.editReply();
Want results from more Discord servers?
Add your server