A message or modal component. Integer type discriminator: 1 Action Row, 2 Button, 3 String Select, 4 Text Input, 5 User Select, 6 Role Select, 7 Mentionable Select, 8 Channel Select, 9 Section, 10 Text Display, 11 Thumbnail, 12 Media Gallery, 13 File, 14 Separator, 17 Container, 18 Label, 19 File Upload. This struct is the union of the fields of all component types.
| Property | Type | Description |
|---|---|---|
| accent_color | Integer | Color for the accent on a container (RGB from 0x000000 to 0xFFFFFF) |
| accessory | Component | Accessory component of a section (button or thumbnail) |
| channel_types | Channel types to include in a channel select | |
| component | Component | Child component of a label |
| components | Child components (action row, section, container) | |
| content | String | Markdown text of a text display component |
| custom_id | String | Developer-defined identifier (max 100 characters) |
| default_values | Default values for auto-populated select menus | |
| description | String | Alt text of a thumbnail or description of a label |
| disabled | Boolean | Whether the component is disabled |
| divider | Boolean | Whether a visual divider should be displayed in a separator |
| emoji | Emoji | Partial emoji for a button |
| file | Component_Media | File of a file component (attachment://<filename>) |
| id | Integer | Optional identifier for the component |
| items | Items of a media gallery component | |
| label | String | Text that appears on a button, or the label text of a Label component |
| max_length | Integer | Maximum input length for a text input |
| max_values | Integer | Maximum number of items that can be chosen |
| media | Component_Media | Media of a thumbnail component |
| min_length | Integer | Minimum input length for a text input |
| min_values | Integer | Minimum number of items that must be chosen |
| name | String | Name of the file (file component, response only) |
| options | Choices of a string select, radio group or checkbox group | |
| placeholder | String | Placeholder text if nothing is selected or entered |
| required | Boolean | Whether the input is required |
| size | Integer | Size of the file in bytes (file component, response only) |
| sku_id | String | Identifier for a purchasable SKU (premium buttons) |
| spacing | Integer | Size of separator padding (1 small, 2 large) |
| spoiler | Boolean | Whether the media or container should be a spoiler |
| style | Integer | Button style (1-6) or text input style (1 short, 2 paragraph) |
| type | Integer | The type of the component |
| url | String | Url for link-style buttons |
| value | String | Pre-filled value for a text input |