Variables
inputValues
$inputValues
$inputValues returns every value of one modal field, joined by the separator you choose. Use it for the fields that can hold several values: a checkbox group, a select menu with several choices, a file upload that accepts several files. $input[] returns the same values joined by a comma.
Syntax
$inputValues[inputID;(separator)]
Parameters
| Parameter | Description |
|---|---|
inputID |
Required. The custom ID of the modal field. |
separator |
Optional. Text placed between two values, , by default. |
Return Value
- The values of the field, in the order Discord sent them. For a file upload, the link of each file.
- An error is raised when
inputIDis empty (A modal input ID is required.) or when the modal sent no field with this ID (Modal input is unavailable: <inputID>.).
Examples
You picked: $inputValues[plans; and ]
$textSplit[$inputValues[screenshots;|];|]
First file: $splitText[1]
Notes
- The links of uploaded files come from Discord and stop working after 24 hours. Keep an image with
$saveUploadedImage[], any file with$fileSaveURL[]. - For a text input, use
$input[]: a text that contains commas would be cut here.
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.