Giter VIP home page Giter VIP logo

spotty's Introduction

Spotty - The Spotify music sharing bot

To simply add the bot to your server just click here. Then read steps 5 and 6 under How To Use

Its currently just running on my raspberry pi but I eventually might move it to a VPC

Note: Make sure it has permission to send and read messages

Spotty will fetch songs in the specified playlist every X seconds.
If it finds any new songs it will post it to the specified discord channel in the database

Todo ๐Ÿšง

  • 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

Commands โ—

!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

How To Use โ“

  1. Clone repo
  2. pip install -r requirements.txt
  3. Configure a config.py file (see below)
  4. Add your bot to your server and make sure it has permission to send messages
  5. Make a role called 'Spotty Admin'
  6. 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

Sample Config File

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

What It Looks Like

Tracking Track Stop StopID

spotty's People

Contributors

butterncream avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.