Fanbot (Invite to Server)
Fanbot is the ultimate music fanboy! Keep your discord server updated on releases from the spotify artists you love.
Commands: (Works with discord slash commands)
- /setchannel - sets the current channel as the channel that release updates will send to
- /follow {artist_spotify_link} - follow an artist
- /listroles - list all artists the bot is currently following.
- To unfollow an artist, delete their corresponding role.
Use python 3.8 - 3.9, otherwise there will be unexpected behaviors when Spotify rate limits you.
Create an app on Spotify, copy over the client id and client secret.
Create an app and bot on Discord and add the bot to your test server.
- Scopes: bot, applications.commands
- Bot Permissions: Manage Roles, Read Messages/View Channels, Send Messages, Embed Links, Read Message History, Add Reactions (268520512)
Create a database, the default is mysql.connector, but can be configured through settings.py
Environment Variables:
In a .env file in root, fill out the following:
- SP_CLIENT_ID
- SP_CLIENT_SECRET
- DISCORD_TOKEN
- DB_HOST
- DB_USER
- DB_PASSWORD
- DB_NAME
For running tests also fill out:
- TEST_GUILD_ONE_ID
- TEST_GUILD_ONE_MUSIC_CHANNEL_ID
- TEST_GUILD_TWO_ID
- TEST_GUILD_TWO_MUSIC_CHANNEL_ID