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...
No description
3 Replies
d.js toolkit
d.js toolkit9mo ago
- 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 OP
Syjalo
Syjalo9mo ago
The user object isn't sent with autocomplete interactions. You can only access the id by interaction.options.get('option-name').value
Apokalypt
ApokalyptOP9mo ago
Ok thanks 👍
Want results from more Discord servers?
Add your server