Spotify

How can I play Spotify songs? Every npm package uses YouTube...
27 Replies
d.js toolkit
d.js toolkit2y 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/luna2y 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
RichtigJoJoOP2y ago
but how moe works?
treble/luna
treble/luna2y ago
? every bot using spotify just used another source to get their audio 99% of the cases that was youtube
RichtigJoJo
RichtigJoJoOP2y ago
was?
treble/luna
treble/luna2y ago
Using yt's api is agains TOS
RichtigJoJo
RichtigJoJoOP2y ago
but what did they use?
treble/luna
treble/luna2y ago
Who's they
RichtigJoJo
RichtigJoJoOP2y ago
the bot maker
treble/luna
treble/luna2y 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
🕊👻 L𝖊𝖌𝖊𝖓𝖉𝖘 o𝖋 𝕹𝔾𝔻𝕭
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/luna2y ago
Discord player uses yt and is agains ttos We do not support TOS violations
🕊👻 L𝖊𝖌𝖊𝖓𝖉𝖘 o𝖋 𝕹𝔾𝔻𝕭
True, but you form the search into spotify links therefore it searches with Spotify. Not youtube
treble/luna
treble/luna2y ago
Did you even read at all? Sootify's api does not support playback It fetches the audio through youtube
🕊👻 L𝖊𝖌𝖊𝖓𝖉𝖘 o𝖋 𝕹𝔾𝔻𝕭
Really? So if I enter open.spotify link it will get it from YouTube???
treble/luna
treble/luna2y ago
Yes
🕊👻 L𝖊𝖌𝖊𝖓𝖉𝖘 o𝖋 𝕹𝔾𝔻𝕭
YouTube owns Spotify? Because it plays Spotify exclusive music. How does that happen?
treble/luna
treble/luna2y ago
Spotify only offers data about the track, which is then put into YouTube to search the song
treble/luna
treble/luna2y ago
fuck would i know? All i know is that spotify doesnt allow playback Thus youtube is used to fetch the song
🕊👻 L𝖊𝖌𝖊𝖓𝖉𝖘 o𝖋 𝕹𝔾𝔻𝕭
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/luna2y ago
what i'm saying is true spotify's api does not allow playback and this has nothing to do with copyright
🕊👻 L𝖊𝖌𝖊𝖓𝖉𝖘 o𝖋 𝕹𝔾𝔻𝕭
Some songs Spotify generates by themself. Therefore they own the rights.
treble/luna
treble/luna2y ago
what exactly are you trying to achieve? Its agains tos to use yt's api, and that wont change
🕊👻 L𝖊𝖌𝖊𝖓𝖉𝖘 o𝖋 𝕹𝔾𝔻𝕭
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/luna2y 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
🕊👻 L𝖊𝖌𝖊𝖓𝖉𝖘 o𝖋 𝕹𝔾𝔻𝕭
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.
Want results from more Discord servers?
Add your server