Cant get user's voice channel
I'm stumped, when I try to get the users voice channel everything returns null (yes the user is in a vc), but I have the intents so what is going on?
Here is
member.voice
I logged this after I call await guild.members.fetch(user.id)
Here is my client
8 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPI might have put this in the wrong channel, oh no... welp il leave it, I think its fine
this is the correct channel, #djs-voice is for I don't see the
sorry I appear to be blind
you should double check
- that's the correct guild for the channel they're connected to
- that's the correct user
if these are correct, please share more of your code since there isn't really anything else required
@discordjs/voice
if that's what you were thinking
I have the intents
GuildVoiceStates
intentI checked (guild id and user id) and nothing still cant give me the channel.
This is the code im running, im just getting the guild and member then logging the voice
My logging every time gives me the same response
The image here shows me and my (other) bot in a vc, im trying to use another bot to get the channel that Lamar is in
just to confirm, if you log the
voiceStateUpdate
event, is it able to detect your other bot joining/leaving?yes
I can confirm, I see the bot joining and leaving in the event just not when I fetch him
then you should probably triple check that the guild you're fetching is the correct guild
you can also specifically log
newState.guild.id
from the voiceStateUpdate
eventomg bro I found it, my client was not fully ready when I was fetching 🤦♂️
I ran the function in the ready event and boom the channel id
well uh, thanks for helping me 👍, im gonna go back to debugging the original thing that caused all of this a broken if statement