OhGodMusicBot icon indicating copy to clipboard operation
OhGodMusicBot copied to clipboard

Error: No video id found

Open gavwin opened this issue 8 years ago • 4 comments

I'm using your script for a music feature on my bot and when you use the add command and put text that isn't a video id / url, it crashes the bot with the error Error: No video id found

gavwin avatar Mar 09 '17 20:03 gavwin

i am going to add side file copy of server.js with usage of my API for Youtube searching and better stuff handling to fix all problems users are getting

ghost avatar Mar 12 '17 14:03 ghost

That sounds like yt-dl has changed something. Any error should be passed in the callback as err, not thrown as a new Error().

yt.getInfo(url, (err, info) => {
  if(err) return msg.channel.sendMessage('Invalid YouTube Link: ' + err);

As you stated though, you modified the script to work in your bot as a music feature, so I can't ensure that you kept the error handling as that.

bdistin avatar Mar 13 '17 01:03 bdistin

I did keep that error handling with ytdl, but the video ID error occurs whenever I don't give a video ID or URL.

gavwin avatar Mar 13 '17 10:03 gavwin

better version is being worked on and status can be found in #9

ghost avatar Mar 17 '17 23:03 ghost