At last week ytdl has broken. I didn't change anything in my code. But now is outputing "could not find player config"
async function Play(connection,message)
{
try {
message.channel.send(`**${queue[0].title}** ${data.startMusicMsg}\n${queue[0].url}`)
dispatcher = connection
.play(await ytdlD(queue[0].url), {type:'opus', filter: 'audioonly',maxRedirects: 2,range:{start: 10355705, end: 12452856}})
.on("finish",()=>{
queue.shift()
fs.writeFile('./data/queue.json',JSON.stringify(queue),'utf8',(err) => {if (err) console.log(err);})
if(queue[0]!=null)
{
Play(connection,message)
}
else
{
message.channel.send(`**${data.queueEndMsg}**`)
if(message.guild.me.voice.channel!=null) message.guild.me.voice.channel.leave()
}
})
} catch (error) {
console.log(error)
}
}
Who's know how to fix it? Or does ytdl have analogues?
EDIT : When i try to use ytdl's function, that responding to me "could not find player config". Few days ago, that function does work, but after npm install that doesn't I'm using that for music bot on discordjs