Tipos de componentes
Todos los componentes, con su número de type, su categoría y dónde se pueden usar.
type |
Nombre | Categoría | Mensajes | Modales | Interactivo |
|---|---|---|---|---|---|
1 |
Action Row | Layout | ✅ | ⚠️ obsoleto | — |
2 |
Button | Interactivo | ✅ | — | ✅ |
3 |
String Select | Interactivo | ✅ | ✅ | ✅ |
4 |
Text Input | Interactivo | — | ✅ | ✅ |
5 |
User Select | Interactivo | ✅ | ✅ | ✅ |
6 |
Role Select | Interactivo | ✅ | ✅ | ✅ |
7 |
Mentionable Select | Interactivo | ✅ | ✅ | ✅ |
8 |
Channel Select | Interactivo | ✅ | ✅ | ✅ |
9 |
Section | Layout | ✅ | — | — |
10 |
Text Display | Contenido | ✅ | ✅ | — |
11 |
Thumbnail | Contenido | ✅ | — | — |
12 |
Media Gallery | Contenido | ✅ | — | — |
13 |
File | Contenido | ✅ | — | — |
14 |
Separator | Layout | ✅ | — | — |
17 |
Container | Layout | ✅ | — | — |
18 |
Label | Layout | — | ✅ | — |
19 |
File Upload | Interactivo | — | ✅ | ✅ |
21 |
Radio Group | Interactivo | — | ✅ | ✅ |
22 |
Checkbox Group | Interactivo | — | ✅ | ✅ |
23 |
Checkbox | Interactivo | — | ✅ | ✅ |
¿Qué puede ir dentro de qué?
Sección titulada «¿Qué puede ir dentro de qué?»| Padre | Hijos permitidos |
|---|---|
| Mensaje (nivel superior) | Action Row, Text Display, Section, Media Gallery, Separator, File, Container |
| Container | Action Row, Text Display, Section, Media Gallery, Separator, File |
Section → components |
1-3 Text Display |
Section → accessory |
1 Button o 1 Thumbnail |
| Action Row | 1-5 Button, o 1 select (String, User, Role, Mentionable, Channel) |
| Modal (nivel superior) | Label, Text Display |
Label → component |
Text Input, cualquier select, File Upload, Radio Group, Checkbox Group o Checkbox |
Campos comunes
Sección titulada «Campos comunes»| Campo | Tipo | Descripción |
|---|---|---|
type |
entero | obligatorio El tipo de la tabla de arriba. |
id |
entero | opcional Identificador único en el mensaje (32 bits). Se genera solo si no lo pones. |
custom_id |
string | Solo interactivos. 1-100 caracteres, único en el mensaje. |
Estilos de botón
Sección titulada «Estilos de botón»| Nombre | Valor |
|---|---|
| Primary | 1 |
| Secondary | 2 |
| Success | 3 |
| Danger | 4 |
| Link | 5 |
| Premium | 6 |
Estilos de Text Input
Sección titulada «Estilos de Text Input»| Nombre | Valor |
|---|---|
| Short (una línea) | 1 |
| Paragraph (párrafo) | 2 |
Espaciado del Separator
Sección titulada «Espaciado del Separator»| Nombre | Valor |
|---|---|
| Small | 1 |
| Large | 2 |