Skip to content

Twitch Spotify Bot is a bot that listens to your twitch chat for song requests and automatically adds them to your spotify queue.

License

Notifications You must be signed in to change notification settings

sam-hudson02/TwitchSpotifyBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TwitchSpotifyBot

TwitchSpotifyBot is a self hosted spotify song request bot for twitch with discord integration, like command and channel sr leaderboard.

A full list of commands can be found here.

Installation

Prerequisites

  • A spotify premium account
  • Spotify client id and secret keys (Guide)
  • A twitch account for the bot (can be your regular twitch account)
  • A twitch api token (you can generate a token here)
  • python3 installed on your system if you plan to run the bots locally

Optional

Docker installation

  • Pull the docker image using:
docker pull samhudson02/sbotify:latest
  • Or if you're running on a raspberry pi, use:
docker pull samhudson02/sbotify:latest-arm
  • Example compose file:
version: "3.9"

services:
  sbotify:
    image: samhudson02/sbotify
    restart: always
    ports:
      - "5000:5000"
    volumes:
      - /path/to/your/file:/Sbotify/data
    environment:
      - SPOTIFY_CLIENT_ID=Your spotify client ID here
      - SPOTIFY_SECRET=Your spotify secret here
      - SPOTIFY_USERNAME=Your spotify username here
      - TWITCH_TOKEN=Your twitch token here
      - TWITCH_CHANNEL=Your twitch channel here
      - DISCORD_TOKEN=Optional discord token here
      - DISCORD_LEADERBOARD_CHANNEL_ID=Optional leaderboard ID here
      - DISCORD_QUEUE_CHANNEL_ID=Optional queue ID here
  • Go to your host address and you should be redirected to login to spotify

Local installation

  • Install dependencies using:
pip install -r requirements.txt
  • Create folder called 'secret' in 'TwitchSpotifyBot' directory
  • In the 'secret' folder create a file called 'conf.env'
  • Open conf.env and enter the following information:
SPOTIFY_CLIENT_ID="YOUR SPOTIFY CLIENT ID HERE"
SPOTIFY_SECRET="YOUR SPOTIFY SECRET HERE"
SPOTIFY_USERNAME="YOUR SPOTIFY USERNAME HERE"
TWITCH_TOKEN="YOUR TWITCH TOKEN HERE"
TWITCH_CHANNEL="YOUR TWITCH CHANNEL HERE"
DISCORD_TOKEN="OPTIONAL DISCORD TOKEN HERE"
DISCORD_LEADERBOARD_CHANNEL_ID="OPTIONAL DISCORD LEADERBOARD CHANNEL ID HERE"
DISCORD_QUEUE_CHANNEL_ID="OPTIONAL DISCORD QUEUE CHANNEL ID HERE"
  • Run src/main.py
  • Follow instructions to authenticate spotify account

About

Twitch Spotify Bot is a bot that listens to your twitch chat for song requests and automatically adds them to your spotify queue.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages