#Choices Options

16 messages · Page 1 of 1 (latest)

cunning cairnBOT
#

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

faint pebble
#

And which part of that do you need help with?

frank pulsar
#

Reply to choices options

faint pebble
#

You can reply to interactions. That could either be the slashcommand having a StringOption with choices in it. Or a AutocompleteInteraction trying to respond with choices. Which one is it. Elaborate a bit

frank pulsar
#

So I want him to answer the first option with a message and the second option with another

#

But unfortunately I don't know how to make the first option as a variable and the second option

faint pebble
#

You still didn’t tell me if you are talking about slashcommands or what. Show me an example what you mean

frank pulsar
faint pebble
# frank pulsar

Those are Autocomplete values, not choices. So yes, I do need you to be more specific to answer your questions. Tell me what you want to happen with actual examples.
Like:
/say word:hello the bot should reply hello to you too
/say word:bye the bot should reply okay bye?
Or do you mean something else?

frank pulsar
#

Exactly

faint pebble
#
const choice = interaction.options.getString('word');
if (choice === 'hello') …
frank pulsar
#

Thank you ^^

frank pulsar
#

Omg @faint pebble thank you so so so so so much