Discord.js v13 Slash command's option depends on the option
Is this possible?
Example: /command choice1 choice2
If I select "A" in choice1 I get "One" and "Two" as choices in choice. But when I select "B" in choice1, I will get "Three" and "Four" as choice2 options.
16 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.discord.js v13.8.0 node.jsV16
yes
add multiple options right after another?
for example we have command named soundboard
yes
/soundboard language sounds
yes
/soundboard english hello/bye
/soundboard french yo/siu
You can do autocomplete
I think?
How
what is that?
I want to change the second choice when language is selected
English:
French:
One way you can do it is to manage both of those choices with an autocomplete and upon choosing the languages on the first choice, you save that chosen language in a cache
Via
.getFocused
thanks
np
No need to save, you can just get previously filled options in an autocomplete