Multi Select in command parameter
Hello,
i have a general question.
Is it possible to enable multi-selection, similar to stringSelectMenus, as a command parameter?
Let me explain some more:
Example items
I want to create a command that allows you to select multiple choices as parameters for
/gifs
.
For example something like this /gifs Funny Meme
Its not possible right?
The only solution that comes to mind is to add as many 'not required' options as needed to allow the selection of a certain number of favorite gifs like this:
Is there any other way?
Thanks in advance!18 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 OPNo
okay 😄 Thanks
you can indeed add more options, or just use a selectmenu
But if want the user to select only unique
choices
i need to use autocomplete
right?autocomplete are just dynamic choices
if you have preset choices, the user has to pick from them
with autocomplete they can also enter a custom text
Ah okay, so i cant really limit the list of available choices so that the user can only pick a gif once? So something like this doesnt happen
/gifs gif:Meme gif1: Meme
?for that you can use autocomplete yes
alright perfect. Thank you so much for helping 🙂
you're welcome!
I really appreciate it. Okay one last question :d Do i get the selected choice in the autocomplete interaction?
you get the value
i havent played arounf with autocomplete too much,
interaction.options.getFocused()
should do thati do .getString() which gives me the value, i think its more useful than the name
yeah thats also a good way indeed
Alright thanks ❤️
Have a good day
you too!
Thank you too 🙂