Select dropdown
How would I go into adding a Select dropdown list into a slashcommand?
With a list that is more than 25 long.
I'm using discordjs version 14.6
![No description](https://cdn.answeroverflow.com/1201162480869724190/image.png)
12 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPnpm list discord.js version = 14.13.0
node version = 21.6.0
oh
nvm
if u have more than 25 options then u need to use autocomplete
it will always display only 25 choices but the autocomplete will change them depending on what the user inputs
https://discordjs.guide/slash-commands/autocomplete.html
Thank you for the quick response, If you have a list of choices in a json file how would you import that into you interaction if it is more than 25 choices, or would you just need to set autocomplete to true
you can't add more than 25 choices
the autocomplete allows u to change the choices dynamically based on user's input
If I have a list of 30 names then how would I dynamically change the list to the last name on the list if I can only add 25 choices
have u read the guide? https://discordjs.guide/slash-commands/autocomplete.html
Let me check it a bit and then come back if its not working for me
Thanks again, this is what we tried now from the guide
![No description](https://cdn.answeroverflow.com/1201172362729623582/image.png)
and after we updated the slashcommands we get nothing on the list
![No description](https://cdn.answeroverflow.com/1201172490731389049/image.png)
I think we missed that let me have a look at it
Thanks alot for the help you pointed us in the right direction, we got it working after watching some videos