#How can i automaticly create a choice on a command option when a new variable is created ?
37 messages · Page 1 of 1 (latest)
• 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.
are you talking about autocomplete?
example:
and by "new variable created", do you mean an element being added to an array?
AutocompleteInteraction#respond()
Sends results for the autocomplete of this interaction.
nope , im talking like , i do /create test
and then const test is created
and then an option in /set is created with the name of test
does it apply to autocomplete?
just an example of an command
yep
/command test = creates variable test
and then the variable test turns into an option at /command1
so you want something like this?
I don't really get what your question
nope , i already have it
lemme do it again
So you want to update it?
yes
and then with that command
i type /create test
and then the test turns into an variable
/create test should be adding something to an array, if I'm understanding correctly
Not making some variable, it makes no sense
and the variable test turns into an choice at /set
Can you share your code?
/create should add to an array somewhere, /set should read from that array for the autocomplete
if that's what you want