How can I get the voice states of members?
How can I get the voice states of members? For some reason do I only get the voice states of the members who joined a channel after the bot started. Is there a way around it?
6 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
npm list discord.js
[email protected]
node -v
v17.4.0
Code:
Output when I execute the command before rejoining a channel
Do you have the GuildVoices
GuildVoiceStates
intent?It's called
GuildVoiceStates
and yesAh right, my bad
GulidMemberManager#fetch()
checks the cache first, so you're defining member
no differently than if you just accessed interaction.member
If you want to directly query the API to hopefully get the latest fetch results and get the current voice state, you have to use the force
option in the fetch
methodIt still doesnt work