Auto complete allows your bot to read user input as they type it and give user suggestions based on that.
Check example to get started quickly.
- You can only create up to 25 suggestions per option
- You need to enable autocomplete for the option
- You can't use option choices with autocomplete
This callback receives information about current user input. It's used for adding suggestions.
command name is the name of a slash command.
Used for adding new suggestions.
label- text which will be displayed in the suggestion list (for example:
arg-adfrom the previous example)
value- data that can be accessed in a slash command by using
labelis only a display name but
valueholds the actual value for a suggestion.
valuemust have the same type as the currently typed option! Meaning, if the option's type is
valuecan't be set to
Hellobut it can be set to
Returns the name of currently being typed option. For example
arg from the previous example
Returns the current user input. For example
ad from the previous example
$appendOptionSuggestion- adds new suggestion
$autoCompleteOptionName-$autoCompleteOptionValue- suggestion's label. It's set to the option name and user input (
<option name>-<user input>)
$autoCompleteOptionValue- suggestion's value. It's set to whatever user typed.