-
Notifications
You must be signed in to change notification settings - Fork 3
Input resolution
Bilal2453 edited this page Nov 6, 2021
·
1 revision
discordia-components make use of the similar Discordia input-resolution idea. Whenever you see a type ending with -Resolvable
look forward for it here. Some of resolvables here only accept one value, yet they exists; this is because it is easier to explain what it represents in one place, and link it to rest of places.
Represents a custom_id
field for a Discord message component, this is set developer side, and is useful to decide which component exactly did the user interact with.
- Lua string
- Lua table that represents the raw button data (See Button Structure)
- Button object through
discordia_components.Button
- Lua table that has following fields:
Parameter | Type | Optional |
---|---|---|
type | number (see componentType enum) | Must be set to button . |
id | Custom-ID-Resolvable | Only optional if style is set to link . |
url | string | Only required if style is set to link . |
label | string | ✔ |
style | number (see componentType enum) | ✔ |
emoji | Emoji-Resolvable | ✔ |
disabled | boolean | ✔ |
actionRow | number | ✔ |
- Lua table that represents the raw Select Menu data (See Select Menu Structure)
- SelectMenu object through
discordia_components.SelectMenu
- Lua table that has following fields:
Parameter | Type | Optional |
---|---|---|
type | number (see componentType enum) | Must be set to selectMenu . |
id | Custom-ID-Resolvable | |
options | table | ✔ |
minValues | number | ✔ |
maxValues | number | ✔ |
actionRow | number | ✔ |
- Components instance through
discordia_components.Components
class - Button-Resolvable
- SelectMenu-Resolvable
- Lua array where each entry is a table representing a Button or SelectMenu (see above last entry)
Not to be confused with Discordia's one. This here represents a partial emoji object.
- Emoji instance through
Emoji
class - Lua table that has the fields
name
,id
andanimated
; where last two are optional.