Edit embed in DM
Hi, I've already written on the djs-help-v14 channel and received a hint on how I can edit the embed using interaction.update({ components: [] }), but I still don't know how to do it, and I'm out of ideas. I want to achieve the following effect:
When sending a private message to the user with information that they have received a warning (message in an embed), it also creates a button for an appeal in the embed. After clicking the button, it creates a modal.
I want the embed in the private message to be updated after sending the modal (so that the appeal button is removed or set to .setDisabled(true) after successfully sending the modal [isModalSubmit]).
Class 'interactionCreate':
4 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!
- ✅
Marked as resolved by OPfragment class 'warn.js':
its the same as interaction.editReply
you can use
EmbedBuilder.from(interaction.message.embeds[index])
to construct an embed, taking the embed of the message of the interaction as the basethanks, already make it