Skip to content

Conversation

@advaith1
Copy link
Contributor

The file component description says

This is similar to the embeds field of a message but allows you to control the layout of your message by using this anywhere as a component.

but that makes no sense since it has nothing to do with embeds. Without CV2, these would be rendered directly from the uploaded files.

@advaith1 advaith1 requested a review from a team as a code owner April 23, 2025 09:42
@advaith1 advaith1 requested review from anthonydiscord and removed request for a team April 23, 2025 09:42
@anthonydiscord
Copy link
Contributor

Oops good catch. This should have read as:

This is similar to the attachments field of a message but allows you to control the layout of your message by using this anywhere as a component.

Do you mind switching it to that instead?

@advaith1
Copy link
Contributor Author

This is kind of weird because

  • In rendering, it is based on attachments, but the attachments field is actually populated primarily by the files uploaded in the formdata. when sending a message, the attachments field is just used to optionally provide metadata like alt text.
  • When uploading files for components, you still upload files the same way and use attachments for metadata
  • This component also renders files differently from attachments in normal messages, since usually images, videos, and audio files embed, but here they show the generic file ui

Therefore I don't think it makes much sense to say it's similar to the attachments field, from the perspective of someone sending a message with components.

@anthonydiscord
Copy link
Contributor

I think that's a fair point actually. With V2 we don't necessarily want to reference how it used to be, just how it is moving forward.

@anthonydiscord anthonydiscord merged commit 7629dee into discord:main Apr 29, 2025
4 checks passed
mazylol pushed a commit to mazylol/discord-api-docs that referenced this pull request Jul 3, 2025
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