Attachment in embeds causing message.attachments
to be empty
#3231
Replies: 5 comments
-
I don't think we can render attachments in both embeds and attachments concurrently as that may be more confusing for api consumers. Perhaps we can delete the attachment if the embed is removed. |
Beta Was this translation helpful? Give feedback.
-
Yeah, currently it's not reliable to check |
Beta Was this translation helpful? Give feedback.
-
I'm having the same issue, when I attach a image with the embed, the image shows just fine in the embed, but there is no way to remove the attachment again from the embed. Please help! |
Beta Was this translation helpful? Give feedback.
-
Having the same problem here. It's really awkward behavior. |
Beta Was this translation helpful? Give feedback.
-
Same issue here. |
Beta Was this translation helpful? Give feedback.
-
This isn't really a serious issue, but it still can cause confusion for bot owners. Currently, if you create a message with an attachment, it'll show up in
message.attachments
, but if you use the attachment in an embed, the attachment disappears frommessage.attachments
. If you take the same message with the attachment in the embed, then edit the embed away, the attachment re-appears inmessage.attachments
. This can cause issues if the bot creates a message with an attachment in the embed, then edits it away to replace it with some content as it will just cause the message to show that attachment all of a sudden. There's only one way to tell if the embed is using an attachment and that's by checkingimage.proxy_url
,thumbnail.proxy_url
, andvideo.proxy_url
(video, for future cases because why not) to see if they start withhttps://media.discordapp.net/attachments/
.Maybe the message should always have the attachment show up in
message.attachments
or at least some kind of reference to this slight issue in the documentation.Message with an attachment used in an embed:
Editing the embed away changes it to:
Beta Was this translation helpful? Give feedback.
All reactions