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 toolkit6mo 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/luna6mo ago
Use interaction.update
Barnuss
BarnussOP6mo 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/luna6mo ago
you'd have to fetch the message
Barnuss
BarnussOP6mo 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
florentine6mo 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
BarnussOP6mo ago
Sounds good, thanks
Linix
Linix6mo ago
You could also use interaction.editReply();
Want results from more Discord servers?
Add your server