Skip to content

Commit d536934

Browse files
committed
chore: explain the id field in more detail
1 parent 4197a8c commit d536934

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

guide/popular-topics/display-components.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ Opting into using this system by passing the `IsComponentsV2` comes with a set o
1111
- You **can** opt into using display components when editing a message while explicitly setting `content`, `poll`, `embeds`, and `stickers` to null.
1212
- Messages can have up to **40** total components (nested components count!)
1313
- The amount of text across all text display components **cannot** exceed 4000 characters.
14-
- All attached files have to explicitly be referenced in a component (refer to the [Thumbnail](/popular-topics/display-components#thumbnail), [Media Gallery](/popular-topics/display-components#media-gallery), and [File](/popular-topics/display-components#file) sections).
14+
- All attached files have to explicitly be referenced in a component (refer to the [Thumbnail](/popular-topics/display-components#thumbnail), [Media Gallery](/popular-topics/display-components#media-gallery), and [file](/popular-topics/display-components#file) sections).
1515
:::
1616

17+
All components can be passed an optional, unique, `id` field holding a 32-bit integer identifier to later identify them in interaction responses. Do not confuse this with the `custom_id` field for interactive components! You can find more information about this [on the discord api documentation](https://discord.com/developers/docs/components/reference#anatomy-of-a-component). Discord will automatically populate the `id` of components that don't have the `id` specified in the payload sequentially starting from `1`. The `id` value `0` is treated as empty. The order components are automatically filled in is an implementation detail and not officially document. If you want to work with the `id` (for example to find and replace the content of a specific component lateron), you should explicitly specify it.
1718

18-
All components can be passed an optional `id` field holding a 32-bit integer identifier to later identify them in interaction responses. Do not confuse this with the `custom_id` field for interactive components! You can find more information about this field [on the discord API documentation](https://discord.com/developers/docs/components/reference#anatomy-of-a-component).
19-
20-
21-
In the following section, we will explain all display components in detail, how they work together with interactive components, and their limitations.
19+
In the following sections, we will explain all available display component types in detail and show you some examples on how you can use them.
2220

2321
## Text Display
2422

0 commit comments

Comments
 (0)