Bot won't join vc

My bot won't join my voice channel, does anyone know why? there is no errors
message.channel.send(`Playing ${args[1]}`);

var connection = joinVoiceChannel({
guildID: message.guild.id,
channelID: message.member.voice.channel.id,
adapterCreator: message.guild.voiceAdapterCreator
})

connection.on(VoiceConnectionStatus.Ready, () => {
console.log("Voice connection ready");
const player = createAudioPlayer();
connection.subscribe(player);

const audio = createAudioResource('./music.mp3');
player.play(audio);
})
message.channel.send(`Playing ${args[1]}`);

var connection = joinVoiceChannel({
guildID: message.guild.id,
channelID: message.member.voice.channel.id,
adapterCreator: message.guild.voiceAdapterCreator
})

connection.on(VoiceConnectionStatus.Ready, () => {
console.log("Voice connection ready");
const player = createAudioPlayer();
connection.subscribe(player);

const audio = createAudioResource('./music.mp3');
player.play(audio);
})
2 Replies
d.js docs
d.js docs3y ago
• 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.
MrDiamond
MrDiamondOP3y ago
no error
Want results from more Discord servers?
Add your server