#trying to add choices to a sub command

14 messages · Page 1 of 1 (latest)

magic widgetBOT
#

• 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.

glacial tulip
#

ArgumentError: Expected string choices to be of type array but received type Object

#

when i did the same on other scripts it worked but adding it to a sub command is not working for some reason

proper lark
#

remove the spread operator

glacial tulip
#

still giving me the same error

proper lark
#

did you save your code

glacial tulip
#

yes

#

i did this the exact same on another command but i didnt have it on a sub command but adding choices to the sub command is giving me errors which i dont understand why

proper lark
#

wait

#

You cant add an option and a subcommand to a command

#

Its either a command with subcommands, or a command with options

glacial tulip
#

so you arent able to add choices to sub commands if they are in a command?

proper lark
#

you are able to add choices to a sub command but not the main command