-
Notifications
You must be signed in to change notification settings - Fork 2
Spotify Plugin
Ling-Yi Kung edited this page Nov 28, 2015
·
2 revisions
Automatically adds songs to a Spotify playlist by listening for YouTube, Soundcloud, and Spotify links. Each chat has its own playlist, and songs can be deleted or added manually with a query.
- plugins/spotify.py
- soundcloud
- spotipy
- google-api-python-client
- Soundcloud
- Register a client application on a Soundcloud account in order to get the Client ID (the Client Secret and Redirect URI are unnecessary)
- Spotify
- Sign up for a new Spotify account for your bot – this user will own all of the chat playlists
-
Create an application on the Spotify bot account in order to get the Client ID and Client Secret, and to set the Redirect URI
- The Client ID is provided by Spotify when you register an application
- The Client Secret is provided by Spotify when you register an application
- The Redirect URI can be set to anything in this case (e.g.
https://www.google.com
), since it's not client-facing; you must enter the exact URI in the Redirect URI whitelist specified when you register an application
- YouTube
- In the Google Developers Console of your Google bot account, create a new project
- Enable the YouTube Data API in the project (APIs & auth > APIs > YouTube Data API > Enable API)
- Create an API Key (APIs & auth > Credentials > Add credentials > API key > Server key)
"spotify": {
"soundcloud": "SOUNDCLOUD_CLIENT_ID",
"spotify": {
"client_id": "SPOTIFY_CLIENT_ID",
"client_secret": "SPOTIFY_CLIENT_SECRET",
"redirect_uri": "SPOTIFY_REDIRECT_URI",
"user": "SPOTIFY_USER"
},
"youtube": "YOUTUBE_API_KEY"
}
/bot spotify
- Returns whether the plugin is on or off (turned off by default)
/bot spotify on
/bot spotify off
- Turns the plugin on or off
/bot spotify playlist
- Returns the chat's playlist URL
/bot spotify <query>
- Adds the first Spotify search result to the chat playlist
/bot spotify remove <spotify_track_url>
- Removes the track from the playlist
Plugin List | Developer Reference: [ Intro | Plugins | Sinks | In-built Functionality | [Configuration] (Configuration) ]