Image on embed message
Hi, I have a bot that sends an embed message with an image uploaded using
AttachmentBuilder
The image displays correctly, but when I edit the message ~8 hours later, the image no longer works. Does the image expire? I'm modifying the message with the REST API, so I fetch the message before editing it to retrieve the embed :Thonk: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!I do
attachments: []
otherwise I get the image duplicated:discord: Messages Resource - Edit Message
PATCH /channels/channel.id/messages/message.id
Edit a previously sent message. The fields content
, embeds
, and flags
can be edited by the original message author. Other users can only edit flags
and only if they have the MANAGE_MESSAGES
permission in the corresponding channel. When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. Only flags
documented in the table below may be modified by users (unsupported flag changes are currently ignored without error).
read moreThank you for your response 🫡
I’m trying not to use AttachmentBuilder
Here’s the test code I’m using, and if I don’t set
attachments: []
, when I edit the message, I end up with the image both in the embed and in the content of the message, whereas I only want it to appear in the embed
Do you know how to fix this? Thank you for your help :yPrayge:
Code: