Skip to content

docs: Document attachment_id for unfurled media items #7611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

Lulalaby
Copy link
Contributor

@Lulalaby Lulalaby commented Jun 11, 2025

Unfurled Media Items now send back the attachment id (for uploaded and through attachment:// referenced files)
image

References:

Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
@Lulalaby Lulalaby requested a review from a team as a code owner June 11, 2025 00:24
@Lulalaby Lulalaby requested review from abe-discord and removed request for a team June 11, 2025 00:24
@anthonydiscord anthonydiscord requested review from anthonydiscord and removed request for abe-discord June 11, 2025 00:28
freya022 added a commit to freya022/JDA that referenced this pull request Jun 11, 2025
Up until now, automated file uploads were wasteful when editing messages containing existing attachments,
they were always re-uploaded as we couldn't know if the URL was made from a `attachment://`,
or if the user copied and pasted a link.
For this reason, even editing the button that an user clicks triggered re-uploads of all component attachments

Now, attachments that were created from an `attachment://` will instead add an `AttachmentUpdate`,
uploading only new files or messages created from scratch

A caveat of such feature is that it may try to retain attachments it doesn't own,
such as by editing a message with the content of another,
for such cases, a user can call `setForceReuploadIndirectAttachments`

Ref: discord/discord-api-docs#7611
Copy link
Contributor

@anthonydiscord anthonydiscord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great thank you!!

@anthonydiscord anthonydiscord merged commit dc91f07 into discord:main Jun 12, 2025
sebm253 added a commit to disgoorg/disgo that referenced this pull request Jun 12, 2025
@Lulalaby Lulalaby deleted the cv2-unfurled-attachmentid branch June 12, 2025 21:54
mazylol pushed a commit to mazylol/discord-api-docs that referenced this pull request Jul 3, 2025
Signed-off-by: Lala Sabathil <aiko@aitsys.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants