Skip to content

Commit fff436c

Browse files
committed
Update Message_Components.md
1 parent 13780e4 commit fff436c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/interactions/Message_Components.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ An Action Row is a non-interactive container component for other types of compon
9595

9696
| Field | Type | Description |
9797
|------------|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
98-
| id | integer | Unique identifier for the component; auto populated through increment if not provided. |
98+
| id?\* | integer | Unique identifier for the component; auto populated through increment if not provided. |
9999
| type | integer | `1` for a action row |
100100
| components | array of [component objects](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object) | Can be of [type](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object-component-types) `2`, `3`, `4`, `5`, `6`, `7` or `8`; max of 5 |
101101

102+
\* `id` cannot be set if the action row is used for a modal.
102103

103104
## Responding to a Component Interaction
104105

@@ -124,7 +125,7 @@ Buttons are interactive components that render in messages. They can be clicked
124125

125126
| Field | Type | Description |
126127
|------------|-----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
127-
| id | integer | Unique identifier for the component; auto populated through increment if not provided. |
128+
| id? | integer | Unique identifier for the component; auto populated through increment if not provided. |
128129
| type | integer | `2` for a button |
129130
| style | integer | A [button style](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/button-object-button-styles) |
130131
| label? | string | Text that appears on the button; max 80 characters |
@@ -352,7 +353,7 @@ The payloads for the select menu components are detailed in the [select menu str
352353

353354
| Field | Type | Description |
354355
|-----------------------|---------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
355-
| id | integer | Unique identifier for the component; auto populated through increment if not provided. |
356+
| id? | integer | Unique identifier for the component; auto populated through increment if not provided. |
356357
| type | integer | [Type](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/component-object-component-types) of select menu component (text: `3`, user: `5`, role: `6`, mentionable: `7`, channels: `8`) |
357358
| custom_id | string | ID for the select menu; max 100 characters |
358359
| options?\* | array of [select options](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/select-menu-object-select-option-structure) | Specified choices in a select menu (only required and available for string selects (type `3`); max 25 |
@@ -728,7 +729,7 @@ Section components allow you to define up to 3 text display components and add e
728729

729730
| Field | Type | Description |
730731
|------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
731-
| id | integer | Unique identifier for the component; auto populated through increment if not provided. |
732+
| id? | integer | Unique identifier for the component; auto populated through increment if not provided. |
732733
| type | integer | `9` for a section component |
733734
| components | array of [text display objects](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/text-display-object-text-display-structure) | Array of text display components; max of 3. |
734735
| accessory | component | An accessory component, can be [Thumbnail](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/thumbnail-object) or [Button](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/button-object) |
@@ -769,7 +770,7 @@ A text display component allows you to send text.
769770

770771
| Field | Type | Description |
771772
|--------------|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
772-
| id | integer | Unique identifier for the component; auto populated through increment if not provided. |
773+
| id? | integer | Unique identifier for the component; auto populated through increment if not provided. |
773774
| type | integer | `11` for a thumbnail component |
774775
| media | [unfurled media item object](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/unfurled-media-item-object) | Media item for the thumbnail |
775776
| description? | ?string | Description for the thumbnail (max 1024 characters). Defaults to `null` |
@@ -817,7 +818,7 @@ Media gallery components allow you to group images, videos or gifs into a galler
817818

818819
| Field | Type | Description |
819820
|-------|--------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
820-
| id | integer | Unique identifier for the component; auto populated through increment if not provided. |
821+
| id? | integer | Unique identifier for the component; auto populated through increment if not provided. |
821822
| type | integer | `12` for a media gallery component |
822823
| items | array of [media gallery item objects](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/media-gallery-object-media-gallery-item-structure) | Array of media gallery items; max of 10. |
823824

@@ -866,7 +867,7 @@ Note: There is no "preview" support for simple text files, nor audio file suppor
866867

867868
| Field | Type | Description |
868869
|----------|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
869-
| id | integer | Unique identifier for the component; auto populated through increment if not provided. |
870+
| id? | integer | Unique identifier for the component; auto populated through increment if not provided. |
870871
| type | integer | `13` for a file component |
871872
| file | [unfurled media item object](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/unfurled-media-item-object) | The file to be displayed, supports only `attachment://<filename>` references |
872873
| spoiler? | boolean | Whether the file is a spoiler. Defaults to `false` |
@@ -909,7 +910,7 @@ Separator components allow you to divide components with a divider. You can make
909910

910911
| Field | Type | Description |
911912
|----------|---------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
912-
| id | integer | Unique identifier for the component; auto populated through increment if not provided. |
913+
| id? | integer | Unique identifier for the component; auto populated through increment if not provided. |
913914
| type | integer | `14` for a separator component |
914915
| divider? | boolean | Whether the separator is a divider. Defaults to `true` |
915916
| spacing? | [seperator spacing size](#DOCS_INTERACTIONS_MESSAGE_COMPONENTS/separator-object-separator-spacing-size) | Spacing size for the separator. Defaults to `1` |
@@ -1023,7 +1024,7 @@ Containers are a new way to group components together. You can also specify a ac
10231024

10241025
| Field | Type | Description |
10251026
|---------------|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
1026-
| id | integer | Unique identifier for the component; auto populated through increment if not provided. |
1027+
| id? | integer | Unique identifier for the component; auto populated through increment if not provided. |
10271028
| type | integer | `17` for a container |
10281029
| accent_color? | ?integer | Color code for the container. Defaults to `null` |
10291030
| spoiler? | boolean | Whether the container is a spoiler. Defaults to `false` |

0 commit comments

Comments
 (0)