Incorrect client joins channel when using joinVoiceChannel()
[email protected]
npm v18.16.0
I have multiple clients logged in and I am trying to connect specific ones to different voice channels.
The first time I do this it works fine; the correct bot (Loudspeaker 4) joins the correct channel.
The next time I try to do this with a different bot (Loudspeaker 3), Loudspeaker 4 joins the channel instead despite Loudspeaker 3 instantiating the guild and channel.
Here's the relevant code:
For the first connection, this is printed:
and the correct bot joins General as expected.
When I move to a different channel and attempt the same thing, this is printed:
This should indicate that Loudspeaker 3 will join, but in reality Loudspeaker 4 just switches channels.
According to this: https://discord.com/channels/222078108977594368/1090014703209693194/1090123144594980934, the guild.voiceAdapterCreator will cause the client who instantiated the guild to connect. As the logs show, L3 is instantiating the guild used to get the adapter.
Additionally, Loudspeaker 4's connection updates to reflect the new channel, even though the connection is being assigned to Loudspeaker 3. This is shown by the log of the client, and the connection is assigned to that client.
Any ideas on what's going wrong here?
4 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.[email protected]
@discordjs/[email protected]
npm v18.16.0
i see
do I have to use something specific or does it just need to be any unique string
thanks
Yeah that was the problem, thank you