Please describe the problem you are having in as much detail as possible:
I'm unable to get my bot to join any voice channel. The bot has administrator privileges and I've made sure it has perms to join the voice channel. Real problem is that I get no errors in console, and it does run the code fine. I also tried two different guides on discordjs/voice: the official one and a random one from YouTube (a part of it below), both of the guides had the same result with bot not joining a voice channel and there being no error logs in console.
Include a reproducible code sample here, if possible:
const discordVoice = require('@discordjs/voice');
const player = discordVoice.createAudioPlayer();
const resource = discordVoice.createAudioResource(`/sounds/happy/${happySoundsRandom}`);
const connection = discordVoice.joinVoiceChannel({
channelId: channel.id,
guildId: message.guild.id,
adapterCreator: message.guild.voiceAdapterCreator,
});
player.play(resource);
connection.subscribe(player);
console.log("Bot sent to voice"); // this one gets logged to the console after the command is triggered.
Further details:
@discordjs/voice version: 0.6.0
Node.js version: v16.11.1
Operating system: macOS Big Sur 11.6
Priority this issue should have – please be realistic and elaborate if possible: Medium
Relevant client options:
partials: CHANNEL
gateway intents: 32767 (temporary for testing purposes)
Please describe the problem you are having in as much detail as possible:
I'm unable to get my bot to join any voice channel. The bot has administrator privileges and I've made sure it has perms to join the voice channel. Real problem is that I get no errors in console, and it does run the code fine. I also tried two different guides on discordjs/voice: the official one and a random one from YouTube (a part of it below), both of the guides had the same result with bot not joining a voice channel and there being no error logs in console.
Include a reproducible code sample here, if possible:
Further details:
Relevant client options: