bit won’t join voice channel

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);
})
3 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 method joinVoiceChannel Creates a VoiceConnection to a Discord voice channel.
조아오
조아오3y ago
The args are with the ID uppercased
MrDiamond
MrDiamondOP3y ago
Like guild.ID or guildId? Ohh ok Maybe its time to switch to ts
Want results from more Discord servers?
Add your server