discord bot disconnect from voice channel discord.js code example
Example 1: recieve voice channel audio discord.js
const audio = connectionA.receiver.createStream('User ID');
connectionB.play(audio, { type: 'opus' });
Example 2: discord js bot leave voice channel
client.leaveVoiceChannel(message.member.voiceState.channelID);
message.channel.createMessage(`Thanks for tuning in!`);