bot not joining
djs v14, voice 0.16 & node v18.12.1
i did try to console.log - here's my code:
and everything it gave checks out, but it isnt joining
i did try to console.log - here's my code:
if (message.content.startsWith('.vsaucemeup')) {
const { joinVoiceChannel, createAudioPlayer, createAudioResource } = require('@discordjs/voice');
const channel = message.content.split(' ?c ')[1]
console.log(channel)
const player = createAudioPlayer();
const connection = joinVoiceChannel({
channelId: channel,
guildId: message.channel.guild.id,
adapterCreator: message.channel.guild.voiceAdapterCreator,
});
const resource = createAudioResource('vsauce.mp3');
console.log(resource)
player.play(resource);
connection.subscribe(player);
}if (message.content.startsWith('.vsaucemeup')) {
const { joinVoiceChannel, createAudioPlayer, createAudioResource } = require('@discordjs/voice');
const channel = message.content.split(' ?c ')[1]
console.log(channel)
const player = createAudioPlayer();
const connection = joinVoiceChannel({
channelId: channel,
guildId: message.channel.guild.id,
adapterCreator: message.channel.guild.voiceAdapterCreator,
});
const resource = createAudioResource('vsauce.mp3');
console.log(resource)
player.play(resource);
connection.subscribe(player);
}