This is a Discord Bot for amalgamating Youtube and Spotify links sent to a Discord channel into a nominated Spotify Playlist.
- clone this repository
- run
bundle install
- add the folloing to a .env file:
- APPURL=your app url
- SPOTIFY_CLIENT_ID=your spotify client id
- SPOTIFY_USER_ID=your spotify user id
- SOTD_PLAYLIST=the UID of the Song Of The Day Playlist (you'll need edit scope with the above client id)
- REDIS_URL=URL of your Redis instance
- DISCORD_TOKEN=your discord token
- DISCORD_CLIENT_ID=your discord client ID
- run
bundle exec rackup
locally, or push to Heroku using the included Procfile - you'll have to grant the app access to your Spotify, account, so navigate to the root
'/'
of your URL and sign in using the provided link. Once signed in the authorization token will be stored in Redis and refreshed when needed.
Invite the bot into your channel, then post a song link! It'll detect Spotify and Youtube URLs, and (assuming the song is on spotify and the song name / artist is reasonably easy to find on the page) add the song to the chosen playlist.