To simply add the bot to your server just click here. Then read steps 5 and 6 under How To Use
- Wait for spotify webhooks 😟
- Exception handling for the database ✔️ (kind of)
- Better permissions for things like !stop and !track ✔️
- Limit the channels in which !track can be called ❌
- !random 🆔 - Randomly pick a song from the specific playlist ✔️
- !where - List the channels in the server that are tracking playlists ❌
- !tracking - returns the unique db id of an entry along with the playlist name ✔️
- !stop 🆔 - Stop tracking the specified playlist. Where id will be the specified unique id from !tracking ✔️
- !link 🆔 - Get the link of the specified playlist. id from !tracking ✔️
- Have the option for 🆔 to also be the spotify playlist id instead of just being the unique id from the database ✔️
- Fix / Update logging. (Use RotatingFileHandler and logging config file) ✔️ (Using RotatingFileHandler)
- more TBD
!help - As you'd expect
!track <playlist-id> <playlist-id> ... - Will post new songs added to the playlist in the discord channel you use this command in (see below)
!tracking - List the names and ids of what the current channel is tracking
!stop <id> - Stop the current channel from tracking anything or a specific playlist if the id from !tracking is specified
!purgeme - Removes ALL of your tracking entries in the database
!link <id> - Get the link of a playlist you are tracking. Get id from !tracking
!random <id> - Gets a random song from the playlist specified. id can be from !tracking or the playlists id
- Clone repo
- pip install -r requirements.txt
- Configure a config.py file (see below)
- Add your bot to your server and make sure it has permission to send messages
- Make a role called 'Spotty Admin'
- Assign the role whoever you want to be able to use the !track command
Until I figure out a better way of handling permissions, this is how it works so everyone cant !track
import os
import pytz
client_id = 'SPOTIFY_CLIENT_ID'
client_secret = 'SPOTIFY_SECRET'
spotty_token = 'BOT_TOKEN'
delay = 30
db_location = r'db/spotty.db' # Local db
spotify_user_id = 'your user id'
old_time = pytz.timezone("UTC") # Spotify's timestamps
new_time = pytz.timezone("America/Los_Angeles") # Your timezone