I have made this JavaScript discord music bot using distube, ytdl-core, discord.js, ffmpeg-static. This bot was perfectly running but from past 3-4 days I am continuously getting this error:
Cookie header used in request, but unable to find YouTube identity token
I am getting this error only with play command and every other command works great.
Yes, that's an ytdl-core error when bot tries to get the song and the cookie is used but the library cannot find the "identity token" so, you can prevent it with a Javascript try/catch:
Example with distube library: