hmes98318 / Music-Disc

A Discord music bot, supports YouTube, Spotify, SoundCloud, Deezer streams and web dashboard.
https://musicdisc.ggwp.tw
MIT License
107 stars 105 forks source link

v1.3.1 Error ❌ | No results found. #18

Closed taninsk137 closed 1 year ago

taninsk137 commented 1 year ago

after I play any song it will error "❌ | No results found."

[edit] if downgrade "discord-player" to "~6.0.0" it will work normally

hmes98318 commented 1 year ago

umm...I need some time to check the module's dependency issues.
v1.3.1 has changed the stream extractor library.
Have you installed the play-dl module and added the DP_FORCE_YTDL_MOD = "play-dl" environment variable?

taninsk137 commented 1 year ago

yes i reforked ur new version and launch it

hmes98318 commented 1 year ago

These are the current dependency versions that I can run properly.

music-disc@1.3.1 
├── console-stamp@3.1.1
├── discord-player@6.1.1
├── discord.js@14.7.1
├── dotenv@16.0.3
├── express@4.18.2
├── ffmpeg-static@5.1.0
├── ms@2.1.3
├── opusscript@0.0.8
└── play-dl@1.9.6

Could you provide the current operating system and npm modules version information?
Because discord-player may encounter same errors and fail to run on some Linux distributions.

hmes98318 commented 1 year ago

The Docker image hmes98318/music-disc:1.3.1 can play music normally, it can be used as a temporary solution

taninsk137 commented 1 year ago

i run it on Glitch and this is "npm list" no error

music-disc@1.3.1 /app ├── console-stamp@3.1.1 ├── discord-player@6.0.0 ├── discord.js@14.9.0 ├── dotenv@16.0.3 ├── express@4.18.2 ├── ffmpeg-static@5.1.0 ├── ms@2.1.3 ├── opusscript@0.0.8 └── play-dl@1.9.6

taninsk137 commented 1 year ago

$ npm list music-disc@1.3.1 /app ├── console-stamp@3.1.1 ├── discord-player@6.1.1 ├── discord.js@14.7.1 ├── dotenv@16.0.3 ├── express@4.18.2 ├── ffmpeg-static@5.1.0 ├── ms@2.1.3 ├── opusscript@0.0.8 └── play-dl@1.9.6

I tried package like u mention above on Glitch node v16.14.2, npm 7.20.6 but I got error after playing song (command: .p song) ❌ | No results found. If discord-player@6.0.0, its work

hmes98318 commented 1 year ago

I can play music normally on Glitch using v1.3.1 with discord-player 6.1.1 and 6.0.0 + play-dl.

If some specific sources (such as YouTube age restrictions) cannot be played and I haven't handled the exception.
Do you get the same "No results found" problem when trying to play other songs?

taninsk137 commented 1 year ago

I got "No results found" on all songs with discord-player 6.1.1 if search from text ex. (.p babyshark) its not work with word but works on link (.p https://www.youtube.com/watch?v=71KuVORecY8) But no problem with discord-player 6.0.0

sry about my eng

hmes98318 commented 1 year ago

Oops, I didn't test the text search for the search command.
I will fix this feature as soon as possible.

hmes98318 commented 1 year ago

I got "No results found" on all songs with discord-player 6.1.1 if search from text ex. (.p babyshark) its not work with word but works on link (.p https://www.youtube.com/watch?v=71KuVORecY8) But no problem with discord-player 6.0.0

Try update discord.js to 14.9.0.

taninsk137 commented 1 year ago

already tried discord.js@14.9.0 text search still not work but link works perfectly

taninsk137 commented 1 year ago

i posted this error on discord-player's github

solution: add this in the package @discord-player/extractor

hmes98318 commented 1 year ago

Got it! Thanks for the solution.

taninsk137 commented 1 year ago

But when i queue it search in spotify not youtube... any fix?

hmes98318 commented 1 year ago

Umm... the default query type is YouTube.
I think we can add an environment variable option to let you choose the query type yourself.

taninsk137 commented 1 year ago

I played the same song (.p ditto) and same code "discord-player": "6.1.0" results: youtube source THREE DAYS ONLY Easy 6 IV Ditto Raid Spotlight - Pokemon Scarlet and Violet "discord-player": "6.1.1" results: spotify source Ditto

hmes98318 commented 1 year ago

Sorry, I misspoke. The default query type for discord-player is AUTO, and most search results are primarily from YouTube.

taninsk137 commented 1 year ago

https://github.com/taninsk137/nonmaipor-2/blob/main/src/commands/play.js

i edited the code querytype to YOUTUBE but still search from spotify

hmes98318 commented 1 year ago

The key should not be 'type'. Changing it to the following will make the response work: https://github.com/hmes98318/Music-Disc/blob/62f76ad8ca3a1b2d4380a1813e7f73a8673f40d1/src/commands/play.js#L25

taninsk137 commented 1 year ago

https://github.com/taninsk137/nonmaipor-2/blob/main/src/commands/play.js I edited ur old code to the link above and it works. I wait for ur update ^^

hmes98318 commented 1 year ago

v1.3.2 has been updated.