How can i automaticly create a choice on a command option when a new variable is created ?

.
18 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs3y ago
method AutocompleteInteraction#respond() Sends results for the autocomplete of this interaction.
Ashura
AshuraOP3y ago
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?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Ashura
AshuraOP3y ago
just an example of an command yep /command test = creates variable test and then the variable test turns into an option at /command1
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Ashura
AshuraOP3y ago
nope , i already have it lemme do it again
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Ashura
AshuraOP3y ago
wait /create is a command alr?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Ashura
AshuraOP3y ago
and then with that command i type /create test and then the test turns into an variable
MrMythical
MrMythical3y ago
/create test should be adding something to an array, if I'm understanding correctly Not making some variable, it makes no sense
Ashura
AshuraOP3y ago
and the variable test turns into an choice at /set
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs3y ago
To share long code snippets use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks.
Ashura
AshuraOP3y ago
did the array thin thing but when i try to add dinoname to the array it says its undefined
Ashura
AshuraOP3y ago
ReferenceError: dinoname is not defined at Object.<anonymous> (C:\Users\luizs\Documents\Discord Bot\commands\create.js:89:17) at Module._compile (node:internal/modules/cjs/loader:1159:14) at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) at Module.load (node:internal/modules/cjs/loader:1037:32) at Module._load (node:internal/modules/cjs/loader:878:12) at Module.require (node:internal/modules/cjs/loader:1061:19) at require (node:internal/modules/cjs/helpers:103:18) at Object.<anonymous> (C:\Users\luizs\Documents\Discord Bot\index.js:14:18) at Module._compile (node:internal/modules/cjs/loader:1159:14) at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
Want results from more Discord servers?
Add your server