kaname-png - Why does this interaction option retu...
Why does this interaction option return null?
6 Replies
It will always return null in autocomplete because discord does not emit the data as User or Member iirc
All you have to do is use
.get('name')?.value
Here's a reference when I had the same issue long back
https://discord.com/channels/737141877803057244/889973175583133717/960879520678834196
@sawa_ko
The typings were fixed in v14
.getUser and .getMember no longer exists on autocompleteMember and user cannot have autocomplete anyway. Only string and integer can.
https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
https://discord.com/developers/docs/interactions/application-commands#autocomplete
Discord Developer Portal
Discord Developer Portal — API Docs for Bots and Developers
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
its not using autocomplete in member favna
they have 2 options
[ member ] [ string -> with autocomplete ]
autocomplete interaction wont emit member/user structure hence the issue
just like the github command uses string option to determine repo and gives prs and issues in autocomplete
Hmm
Okay ig