Categorygithub.com/samuelrey/spot-the-bot
repositorypackage
0.0.0-20211120035808-5b36bf079f84
Repository: https://github.com/samuelrey/spot-the-bot.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

spot-the-bot (aka Spot)

Build collaborative playlists with friends.

Installation

In this section we cover how to setup applications for message & music services, and how to configure environment variables for Spot.

Discord

Start by creating a new application for Spot in the Discord developer portal. Next install Spot to your server. Replace your client ID and navigate to the authorization URL. Select the server on which you want to install Spot.

https://discord.com/oauth2/authorize?client_id=REPLACEME&scope=bot&permissions=2048

Spot requires permission to send messages, hence 2048.

Spotify

Start by creating a new application for Spot in the Spotify developer portal. In order to authenticate, you will have to set the redirect URL to the address where you deploy Spot, eg http://example.com/callback.

Environment Variables

Spot uses environment variables to interact with message & music services.

ServiceVariableDescription
DiscordDISCORD_TOKENToken found under the Bot section of the application.
SpotifyCLIENT_IDID found in the overview of the application.
SpotifySECRETClient secret found in the overview of the application.
SpotifyREDIRECT_URLThe address where you deploy Spot, eg http://example.com/callback.

Usage

In this section we cover how to run and interact with Spot.

Run

go build && ./spot-the-bot

You will then be prompted to authorize Spot to create playlists for a Spotify user. This could be your own personal account, but we recommend you create a separate account for Spot.

Commands

At this point you can interact with Spot.

CommandDescription
!joinJump into the queue of people that want to start a playlist.
!leaveJump out of the queue.
!listView the queue.
!nextMove yourself to the back of the queue if you are at the front.
!createMake a new playlist if you are at the front of the queue. Spot will send you the link to the playlist. You will add a handful of songs (4-6) and share the playlist with the rest of the group.

Anybody can add to the playlist, not just people in the queue!

Contibuting

I'm happy to work together--feel free to reach out!

Checkout the GitHub Issues for feature and improvement ideas.

Start at the Installation section. Most steps listed there are required for local development and testing. Any additional steps are covered below.

Spotify

Add http://localhost:8080/callback to the list of redirect URLs in the developer portal and set the REDIRECT_URL environment variable accordingly.