Edit Embed with buttons
Hey, I have an embed and btns, I can also access the btns, but now I want the embed to be edited when I click on the previous btn, for example, it doesn't matter at first, the main thing is that something happens. If I do interaction.update... it works. But I just can't figure out how to edit the embed.
To keep it simple, I'm sending a git repo: https://github.com/TheBrain08/DCBot
The files in question are:
src/utils/handleButtonInteractions.js
src/events/interactionCreate/handleCommands.js
src/commands/moderation/help.js
Thanks in advance
[email protected]
node: v22.11.0
GitHub
GitHub - TheBrain08/DCBot
Contribute to TheBrain08/DCBot development by creating an account on GitHub.
5 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 OPYou can do EmbedBuilder.from(oldEmbed) and then use that returned builder to change what you want and pass it to update()
okay but how can i acces the oldEmbed ? like this:
?
did you try it?
i tried this
and thas the error....
the first console.log() is still executed and then it crashes
nvm my bad i have it. But thank you for the tip with the EmbedBuilder.from !