Spotify 'query' not working, link works with playing
Hey, i'm working on my discord bot to only play spotify tracks and other supported sources. However, i'm having an issue. When I use a Spotify query like this:
/play query:i gotta feeling - black eyed peas
, I get the error: "Oops! I couldn't find anything matching your query on Spotify. 🤔 Try something else, maybe?" (which is my own custom message). But, when I use a direct Spotify link like this: /play query:https://open.spotify.com/track/4kLLWz7srcuLKA7Et40PQR?si=9ec37e8d597046ae
, it works fine and starts playing.
Anyone has an idea to where it goes wrong?
Code will be posted down below ⬇️7 Replies
I'm using an publicly available Lavalink server for development purposes, I will switch to own one later, this is the one that I'm using.
The actual code:
Hey, Justin for source param/argument it's spsearch for Spotify. I don't think moonlink.js handles normal source Names other than source identifiers(ytsearch,spsearch, etc).
You had no issues with links as it's not dependent on the source parameter/argument, It's directly detected based on Link/Url provided by the user/you.
Solution
So like this?
GG @Justin, you just advanced to level 3!
Yes.
That worked, thanks!
Welcome. Mark https://discord.com/channels/990369410344701964/1350751164756394024/1350770928300064839 as the solution.
^^ example like above