Get list of users (usernames or user IDs preferably) in a voice channel to loop through
Hello. I am trying to get a list of the users that are in a specific voice channel. I went ahead to add the GuildVoiceStates for Intents and try to pull the user names using the command below.
Whenever I try the command above, it would just give me the data about voiceState and not specifically information about the members.
If anyone can help me, I would greatly appreciate it.
[email protected]
node v18.16.0
5 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.As you can see it's members of a guild, not a voice channel.
You need
I see it now. Thank you so much.
And then to get the user ID, would it be something like
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Perfect. I'll do so. So far, it seems to be working though so I'm gonna put it through a forEach loop right now and try to do what I wanna do.
It worked. Everything seems to be working smoothly now. Thank you for the help.