Hello, I'm trying to make a distributed music bot service for a single guild. Long story (https://stackoverflow.com/questions/75860115/is-there-a-way-to-connect-a-specific-discord-js-client-to-a-voice-channel) short, I've logged in several other clients I'd like to have connect to a voice channel when a user uses /play. The main bot that receives the command runs
const channel = interaction.member.voice.channel;
const { joinVoiceChannel } = require('@discordjs/voice');
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator
});
and causes the main bot to join. I don't see anything that specifies which client is connecting, so I'm stumped on what to do.
Ideally, I'd do something simple like client.voice.join(channel); but that doesn't seem possible from what I've seen.