Ir al contenido

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 — ✅ ✅
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
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.
Nombre Valor
Primary 1
Secondary 2
Success 3
Danger 4
Link 5
Premium 6
Nombre Valor
Short (una línea) 1
Paragraph (párrafo) 2
Nombre Valor
Small 1
Large 2