derekmartinez18 / discord.js-music

Music Plugin for Discord.js
ISC License
1 stars 0 forks source link

Every song is says "Invalid video!" #1

Open MAPReiff opened 7 years ago

MAPReiff commented 7 years ago

Hello, So I used the module on my bot and I found something rather interesting. When running the bot on windows (I run it 24/7 on an old PC) every link was deemed invalid by the bot. However, when I copied the code to my MacBook and ran the bot, everything functioned fine. There was no error in command prompt, and I cannot seem to figure out what is causing the issue.

derekmartinez18 commented 7 years ago

I don't have it so bad, but yeah I have noticed on Windows it throws more invalid errors. I think this might be an issue with the dependency for fetching the details from YouTube. The best solution might just be to use request against the YouTube API.

I'll need to look into this a bit more.

derekmartinez18 commented 7 years ago

I have a solution I'll be pushing in a bit which uses a new fetching library. It'll require you to get a YouTube v3 API Key, which is fairly easy to obtain. This will also return the searching capability.

MAPReiff commented 7 years ago

Where can I get one of the API keys?

derekmartinez18 commented 7 years ago

https://developers.google.com/youtube/v3/getting-started

derekmartinez18 commented 7 years ago

I've pushed this update.

Let me know if it resolves this problem.

MAPReiff commented 7 years ago

I'll try is asap

On Fri, Feb 24, 2017 at 3:25 PM, Derek Martinez notifications@github.com wrote:

I've pushed this update.

Let me know if it resolves this problem.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/derekmartinez18/discord.js-music/issues/1#issuecomment-282395446, or mute the thread https://github.com/notifications/unsubscribe-auth/AG6DXfK5A2nwlkvdWGHrsBFHNeAblh4Sks5rfzyjgaJpZM4MLXKq .

MAPReiff commented 7 years ago

Now says I'm missing my Opus engine.

derekmartinez18 commented 7 years ago

are you sure you have the node-opus package?

MAPReiff commented 7 years ago

I have it

On Sat, Feb 25, 2017 at 8:30 PM, Derek Martinez notifications@github.com wrote:

are you sure you have the node-opus package?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/derekmartinez18/discord.js-music/issues/1#issuecomment-282525496, or mute the thread https://github.com/notifications/unsubscribe-auth/AG6DXYitF4OVbfzD-7OMrQyM2tU4UtOxks5rgNW9gaJpZM4MLXKq .

derekmartinez18 commented 7 years ago

This is very weird, but sounds like an issue with node-opus or discord.js itself, my end of things has nothing to do with it and I am not getting this on my Windows machine, my Macbook, or my Linux VM. What is the exact error message? ..I might be able to help find a solution.

MAPReiff commented 7 years ago

Its working fine on my MacBook, and I should try a Linux VM now that you mention it. Here's the error https://gist.github.com/MAPReiff/f0ca0363748e20c4b77e0867413672a2

On Sat, Feb 25, 2017 at 10:04 PM, Derek Martinez notifications@github.com wrote:

This is very weird, but sounds like an issue with node-opus or discord.js itself, my end of things has nothing to do with it and I am not getting this on my Windows machine, my Macbook, or my Linux VM. What is the exact error message? ..I might be able to help find a solution.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/derekmartinez18/discord.js-music/issues/1#issuecomment-282529052, or mute the thread https://github.com/notifications/unsubscribe-auth/AG6DXdAjB5_EHRQtr5ZHBkuTSCPceNi3ks5rgOu6gaJpZM4MLXKq .

MAPReiff commented 7 years ago

Any ideas?

derekmartinez18 commented 7 years ago

The only thing that would throw that is if for some reason Discord.js couldn't find the opus dependency.