Reputation: 11
I'm trying to get a list / an array of users (username/id) connected to the voice channel of the one who launched the command. I feel like I'm on a good way but I don't find how to do this. for now, I tried message.member.voice.channel.members
but It's a long list of information about who is in the channel. I only want their name / tag.
Upvotes: 1
Views: 2734
Reputation: 150
try this:
message.member.voice.channel.members.each(member=>{
console.log(member.user.tag)
})
for more info read official discord.js documentation
Upvotes: 1