Components & Interactions
autoCompleteOptionValue
$autoCompleteOptionValue
Returns the text typed so far in the option being completed, inside an option’s autocomplete script. It takes no argument. Anywhere else it raises Autocomplete functions can only be used in an autocomplete script.
Syntax
$autoCompleteOptionValue
Behavior
- The value is the raw text of the field; it is empty when the user has typed nothing yet.
- Read-only script, 2 seconds (Discord gives 3 and cannot defer), 25 suggestions at most: see
$appendOptionSuggestionfor how to enable autocomplete on an option and for the limits.
Example
$if[$autoCompleteOptionValue==]
$appendOptionSuggestion[Start typing...;none]
$else
$appendOptionSuggestion[Search: $autoCompleteOptionValue;$autoCompleteOptionValue]
$endif
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.