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);
            })
Was this page helpful?