Provide a way to differentiate unfurled media owned by the application from other Discord CDN URLs #7607
-
ContextThis post will focus on Components V2 I believe libraries should be able to automatically retain attachments when editing messages, this will go toward an effort to:
The issueTo implement this, one would currently have to parse the unfurled media URLs, to obtain the attachment ID which is the 2nd snowflake. However, this method falls apart when an app starts using URLs of attachments they don't own, as Discord will return an ProposalThe goal is to provide library developers the necessary tools to retain attachments they do own, here is a few ideas:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have implemented |
Beta Was this translation helpful? Give feedback.
I have implemented
attachment_id
as a field onUnfurledMedia
when they are backed by an attachment via theattachment://<filename>
protocol. You should now be able to know what attachment ids are in use on the message and use those when sending theattachment
array to properly retain them.