skick1234 / DisTube

A powerful Discord.js module for simplifying music commands and effortless playback of various sources with integrated audio filters.
https://distube.js.org
MIT License
423 stars 94 forks source link

Playing Issue #1

Closed alhassanv closed 4 years ago

alhassanv commented 4 years ago

Describe the bug The bug is an issue where I get an error

(node:4016) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'url' of undefined
at StreamDispatcher.<anonymous> (/home/container/node_modules/distube/src/DisTube.js:782:51)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)

which occurs sometimes when using the play cmd

Expected behavior No errors should be thrown.

Additional context I am using version 2.1.4

skick1234 commented 4 years ago

Thank you very much. I fixed it in 2.1.9

alhassanv commented 4 years ago

I get this error now

(node:4071) UnhandledPromiseRejectionWarning: Error: Video unavailable at Object.exports.playError (/home/container/node_modules/ytdl-core/lib/util.js:441:12) at downloadFromInfoCallback (/home/container/node_modules/ytdl-core/lib/index.js:58:18) at /home/container/node_modules/ytdl-core/lib/index.js:18:5 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:97:5)

skick1234 commented 4 years ago

What video encountered this error? And where your vps/hosting region? Maybe it's blocked in the vps region.

alhassanv commented 4 years ago

What video encountered this error? And where your vps/hosting region? Maybe it's blocked in the vps region.

Not sure what video since its a public bot; hosted in us

skick1234 commented 4 years ago

Not sure what video since its a public bot; hosted in us

Maybe you should log the message content for 1 day. But I think this video is unavailable in the US. I'll try catching ytdl error and log the detailed video in the next version.

alhassanv commented 4 years ago

Return it when there is an error and emit the error event, easy fix haha

skick1234 commented 4 years ago

Return it when there is an error and emit the error event, easy fix haha

Yep :> 2.1.10 is available now. you can use it and give me some feedback. And I've just created a discord server for easier support, you can be the first member :3 https://discord.gg/feaDd9h