In autocomplete, how can I get the value of an option type "User" ?
Hello,
I have a command
unmute
which have 2 options :
- user (type: User)
- mute-id (type: number)
The option "mute-id" support autocompletion and I would like to know how can I get the userId value entered by the user (if there is one) ? In fact, when I take a look at the typing I see that the method <AutocompleteInteraction>.options.getUser are removed...3 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPThe user object isn't sent with autocomplete interactions. You can only access the id by
interaction.options.get('option-name').value
Ok thanks 👍