I need my bot joins a voice channel on ready here is my code
const { joinVoiceChannel } = require('@discordjs/voice');
client.on('ready', () => {
joinVoiceChannel({
channelId: client.channels.cache.get('862785346767814696')
})
})
it return with error (o is not a function)
You have to specify a guild ID and voice adapter creator
joinVoiceChannel({
channelId: "channelId",
guildId: "guildId",
adapterCreator: client.guilds.cache.get("guildId").voiceAdapterCreator
})