Bot disconnects after rejoining.

I'm changing vc of my bot but it immediately disconnects after rejoining... how should i fix it ? I have enabled GatewayIntentBits.GuildVoiceStates Already
No description
11 Replies
d.js toolkit
d.js toolkit3mo ago
- What are your intents? GuildVoiceStates is required to receive voice data! - Show what dependencies you are using -- generateDependencyReport() is exported from @discordjs/voice. - Try looking at common examples: https://github.com/discordjs/voice-examples. - 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!
- TYSON
- TYSONOP3mo ago
Nothing is exported I'm just doing it with djs and my djs/voice version is 0.16.0 message.guild.members.me.voice.setChannel(message.member.voice.channel); My code Also if i drag my bot manually it's disconnecting
pat
pat3mo ago
can you enable debugging on voiceconnection oh wait why are you using voice.setchannel use joinVoiceChannel instead @Thunderᴰᴱⱽ Schema = (OP)
- TYSON
- TYSONOP3mo ago
But if I wanna change voice channel of the bot its already in a vc what should I do then ?
pat
pat3mo ago
yet again the answer is joinVoiceChannel
- TYSON
- TYSONOP3mo ago
Well I'm not getting the point of it actuall If bot is in a voice channel i don't need to use setChannel instead i can do joinVoiceChannel it will work same
pat
pat3mo ago
so are you saying now that you are using joinvoicechannel, it is still disconnecting after joining? can you show the code you are using
- TYSON
- TYSONOP3mo ago
I'm not making it join with joinVoiceChannel I'm using a lavalink music wrapper named shoukaku but it has anything to do with it sir ? Like before it used to work when i used setchannel so it used to moves to a newer one If u still wanna see the code here it is sir.
this.client.shoukaku.joinVoiceChannel({ guildId: msg.guild.id, shardId: msg.guild.shardId || 0, channelId: msg.member.voice?.channel.id, deaf: true })
this.client.shoukaku.joinVoiceChannel({ guildId: msg.guild.id, shardId: msg.guild.shardId || 0, channelId: msg.member.voice?.channel.id, deaf: true })
pat
pat3mo ago
we can't give support for that package since we didn't create it there's a discord link in the github of shoukaku I would ask there
- TYSON
- TYSONOP3mo ago
No I understand but now djs only handles vc if it's joined by djs/voice
pat
pat3mo ago
yes ?
Want results from more Discord servers?
Add your server