VoiceChannel members is always 0

My bot has all the intents enabled in the Dev Portal and programatically
(including GuildVoiceStates and GuildMembers intents)

In VoiceStateUpdate event I need a total members currently in the voice chat

I tried to force fetch all channels and/or force fetch individually and still not working... I am testing when I have ppl in one of the VCs

const channels = guild.channels.cache
const voiceChannels = channels.filter(channel => channel.type === ChannelType.GuildVoice
) ;

await guild.members.fetch();

voiceChannels.forEach(async channel => {
const latestChannel = await guild.channels.fetch(channel.id) as unknown as VoiceChannel;
// latestChannel.members is always Collection 0 with no members in it
}
});
6437429.png
Was this page helpful?