Audio from websites other than a file
I'm new to the discord.js voice section, and I was wondering how to make the bot play music from other websites for example Youtube or Youtube Music, I got it playing music files that are saved on my pc, but currently I'm trying to make it play music from websites, for example I do
!play url
and it plays the url
which is the music video link.14 Replies
- What are your intents?
GuildVoiceStates
is required to receive voice data!
- Show what dependencies you are using -- generateDependencyReport()
is exported from @discordjs/voice
.
- Try looking at common examples: https://github.com/discordjs/voice-examples.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staff(Installing opus is impossible, since it gives me weird errors, and I'm kind of tired to fix it, it just doesnt work, that's why I use opusscript, which works fine and plays music fine.)
anything using youtube's api is against TOS and we will not provide support for it
Oh.
Sorry, did not know it is against ToS.
Well, is there any platform I can stream music from?
That is not against ToS?
Like spotify or soundcloud or weezer or anything.
spotify has no playback api
you can play music you have rights on
So, how do I do that?
not related to djs
Sorry as I said I'm still new to discord.js/voice
you first get the rights
Is there like a doc for spotify's api I can find myself?
spotify has n o playback api
there is basically no source that is TOS compliant
ah
So basically all music bots are illegal?
yes
hence why most popular ones shut down
Alright, thanks for letting me know that.