discord-api-docs
discord-api-docs copied to clipboard
Auto-complete options will fail if the next option is required and has length requirements
Description
So I have a command /rename command with two options:
playerwhich has autocomplete options and is requirednamewhich is also required, and has to be between 8 and 32 characters
Turns out, the second option needs to be filled in before autocomplete options can be shown to the user if that second option has length requirements. Without doing this, any autocomplete request will 400 for the user (showing "Loading options failed") and won't even be requested from the bot.
Steps to Reproduce
- Create a command with the above specifications, make sure to give the first option autocomplete where you respond with some options
- Type within the first option
Expected Behavior
Auto-complete functions as usual, with requests to the bot returning options to the user.
Current Behavior
Auto-complete requests will return a 400 for the user (showing "Loading options failed") and won't even be requested from the bot.
Screenshots/Videos

Client and System Information
Canary 145123 (02ff179)
I have this same issue but in the opposite order:
First arg deck is required with a min_length of 6, and a max_length of 6.
Second arg language is optional, but uses autocomplete.
language doesn't autocomplete until the first required arg has first been filled out to 6 characters.
I met the same problem in a different condition. I have a top level command with a single autocomplete option and it works as usual. However, when I use autocomplete in subcommands (with the only autocomplete option), it fails.
For example,
/toplevelcmd autocomplete-option works well, while
/somegroup subcmd autocomplete-option fails.
@gimi65536 I cant reproduce the issue youre describing, can you open a separate issue with:
- Full application command payload
- Create interaction payload that is failing in the client
fixed in next api deploy
Has this been deployed yet? I'm still experiencing the issue
@KevinNovak Can you provide a specific example of an application command JSON and ideally an interaction create payload if you can get it from your client? Im not able to reproduce this error
@yonilerner That was still a problem in Oct. 5 when I reboot my bot last time, but it has somehow been fixed now after I reboot my bot today.