Get every User in a Voice Channel with REST/CORE
How do I do this?
npm list discord.js and node node -v version?GuildCreate event and track further updates from the VoiceStateUpdate event<GatewayVoiceState>.channel_id<Guild>.voiceStates.cache<VoiceChannel>.members exists in discord.js and is a getter that just filters cached GuildMembers based on their voice statesthen you filter by <GatewayVoiceState>.channel_idThen I am confused why I can retrieve users from the different channels.I'm not sure why this would be confusing
Even if the bot was restarted and the cache cleared.in discord.js,
<VoiceChannel>.members relies on the VoiceState and GuildMember cachesGuildMembers are not cached on ready, but you may be fetching all members at some point in your codeGuildCreate event is emitted for each guild a given shard should be handling after connecting to the gateway, so VoiceStates are cached on readyGuildCreateGuildCreateVoiceStateUpdate<GatewayVoiceState>.channel_id<GatewayVoiceState>.channel_id<Guild>.voiceStates.cache<VoiceChannel>.members<VoiceChannel>.membersGuildMemberGuildMemberGuildMemberVoiceStateVoiceState