SudhanPlayz / Discord-MusicBot

An advanced discord music bot, supports Spotify, Soundcloud, YouTube with Shuffling, Volume Control and Web Dashboard with Slash Commands support!
https://musicbot.darrenofficial.com
Other
2.99k stars 2.89k forks source link

Spotify URLs not handled correctly #1215

Closed rartigues closed 1 year ago

rartigues commented 1 year ago

Please describe the problem you are having in as much detail as possible:

Sorry for maybe not understanding the code correctly.

After installing the LavaScr plugin to Lavalink (enabling listening from Spotify) all the Lavalink node recieves from the music bot is ytsearch requests. By looking at the code where the play interaction is processed, I found that even when a Spotify link is provided it is searched for in Youtube.

See interactionCreate.js

TLDR: Even when providing valid Spotify links, all that Lavalink recieves is a ytsearch: request image

Essentials:

Additional system info

Relevant client options:

rartigues commented 1 year ago

I'm aware of issue #1200, this is not a duplicate due to the fault being blamed on Lavalink needing to handle the spotify requests, but the problem I'm having is that Lavalink doesn't recieve a Spotify request

LewdHuTao commented 1 year ago

did you disable spotify plugins in erela manager?

LewdHuTao commented 1 year ago

i bet you did not disable it yet and to save your time all you need to do is go to DiscordMusicBot.js file in lib folder and find this code:

this.manager = new Manager({
      plugins: [
        new deezer(),
        new AppleMusic(),
        new spotify(),
        new facebook(),
        new filters(),
      ],

you need to remove new spotify() to disable spotify plugins and let lavaSrc handle spotify plugins.

Note: if you also use apple and deezer plugins in lavaSrc you also need to disable deezer and apple plugins in erela manager

rartigues commented 1 year ago

Thank you so much! It works perfectly now. I got mixed up from this response, maybe that's the supposed behaviour in v5?

LewdHuTao commented 1 year ago

Thank you so much! It works perfectly now. I got mixed up from this response, maybe that's the supposed behaviour in v5?

he must get it wrong, spotify plugins don’t need any configuration in v5 unless you were using custom lavalink plugins like lavaSrc

anyway i guess this issue has been solved so imma close it, feel free to reopen if you have any issue regarding lavaSrc