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

.
18 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs2y ago
method AutocompleteInteraction#respond() Sends results for the autocomplete of this interaction.
Ashura
Ashura2y 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 User2y ago
Message Not Public
Sign In & Join Server To View
Ashura
Ashura2y 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 User2y ago
Message Not Public
Sign In & Join Server To View
Ashura
Ashura2y ago
nope , i already have it lemme do it again
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Ashura
Ashura2y ago
wait /create is a command alr?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Ashura
Ashura2y ago
and then with that command i type /create test and then the test turns into an variable
MrMythical
MrMythical2y ago
/create test should be adding something to an array, if I'm understanding correctly Not making some variable, it makes no sense
Ashura
Ashura2y ago
and the variable test turns into an choice at /set
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs2y ago
To share long code snippets use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks.
Ashura
Ashura2y ago
did the array thin thing but when i try to add dinoname to the array it says its undefined
Ashura
Ashura2y 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)