Spotify

How can I play Spotify songs? Every npm package uses YouTube...
27 Replies
d.js toolkit
d.js toolkit13mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
treble/luna
treble/luna13mo ago
the simple answer is you cant the more complex answer is that spotify's api does not offer playback, thus you need to find a different source to play the audio
RichtigJoJo
RichtigJoJo13mo ago
but how moe works?
treble/luna
treble/luna13mo ago
? every bot using spotify just used another source to get their audio 99% of the cases that was youtube
RichtigJoJo
RichtigJoJo13mo ago
was?
treble/luna
treble/luna13mo ago
Using yt's api is agains TOS
RichtigJoJo
RichtigJoJo13mo ago
but what did they use?
treble/luna
treble/luna13mo ago
Who's they
RichtigJoJo
RichtigJoJo13mo ago
the bot maker
treble/luna
treble/luna13mo ago
Of which bot regardless, using yt is against tos, and i dont even think any sort of music bots get verified no more regardless of the source
Legends of NGDB™
Use a package like discord-player
npm i discord-player
npm i discord-player
Create an account with Spotify Dev's. Obtain clientId and clientSecret. Then install spotify-web-node I believe that's what it's called. But make the package search spotify retrieve the data then search it via discord-player. MAKE SURE YOU SEARCH VIA AUTO NOT SPOTIFY_MUSIC.
treble/luna
treble/luna13mo ago
Discord player uses yt and is agains ttos We do not support TOS violations
Legends of NGDB™
True, but you form the search into spotify links therefore it searches with Spotify. Not youtube
treble/luna
treble/luna13mo ago
Did you even read at all? Sootify's api does not support playback It fetches the audio through youtube
Legends of NGDB™
Really? So if I enter open.spotify link it will get it from YouTube???
treble/luna
treble/luna13mo ago
Yes
Legends of NGDB™
YouTube owns Spotify? Because it plays Spotify exclusive music. How does that happen?
treble/luna
treble/luna13mo ago
Spotify only offers data about the track, which is then put into YouTube to search the song
Legends of NGDB™
@luna🌈 .
treble/luna
treble/luna13mo ago
fuck would i know? All i know is that spotify doesnt allow playback Thus youtube is used to fetch the song
Legends of NGDB™
I advise looking into to discord-player. Because if "YouTube" is playing the song they could face some serious Copy Right issues. I what you are saying is true.
treble/luna
treble/luna13mo ago
what i'm saying is true spotify's api does not allow playback and this has nothing to do with copyright
Legends of NGDB™
Some songs Spotify generates by themself. Therefore they own the rights.
treble/luna
treble/luna13mo ago
what exactly are you trying to achieve? Its agains tos to use yt's api, and that wont change
Legends of NGDB™
Explaining that you can bypass yt search. I highly doubt that discord-player searches a Spotify link and magically retrieves data from YouTube. If what you were saying is true, then why can't I retrieve exclusive Spotify from YouTube but discord-player can? Yes, I don't disagree that discord-player searches youtube, but it also has more than that. Its the same thing with SoundCloud, and Facebook. If you search a Facebook link on YouTube it will say NO RESULTS. Not with discord-player. It can play the video. It okay though I might be wrong. I'll investagate later on the topic.
treble/luna
treble/luna13mo ago
Spotify's api does not allow playback And trust me I know And so do most people here when you ask them or google it Some use other sources yes But most use yt
Legends of NGDB™
Yup your right with the playback. I wonder how they get the exclusive songs then... I tried looking into their support server but couldn't find one.