interaction.guild.members.me.voice.channel gives null response?
Tried grabbing the voice channel ID from where the bot was at, and I keep getting null or it won't change when the bot joins a new vc.
12 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.node version: v18.16.0
discordjs version: [email protected]
The code you put in the title does that
oh? I thought it grabbed the one I was in-
sorry
are you sure it doesn't grab the one I'm in?
when I was testing it, it only grabs the one I'm in
It returns the channel the bot is in
Updated it to match the problem I was having with it
The bot is not in a voice channel then
it was when the leave command was run, and it should return the disconnect after the message is sent
also when removing connection.destroy() it still has the same issue
Do you have the
GuildVoiceStates
intent?no, should I?
and would I add it as const client = new Client({ intents: [GatewayIntentBits.GuildVoiceStates]}); ?
yes