5 Getting Started
SluberskiHomeLab edited this page 2025-10-13 09:54:01 -05:00

Getting Started

Prerequisites

Before setting up the bot, you'll need:

1. Discord Application

  1. Go to the Discord Developer Portal
  2. Create a new application
  3. Go to the "Bot" section and create a bot
  4. Copy the bot token
  5. In "OAuth2" → "URL Generator", select:
    • Scopes: bot, applications.commands
    • Bot Permissions: Send Messages, Use Slash Commands, 'Connect', 'Speak', 'Use Voice Activity'

2. Spotify Application

  1. Go to the Spotify Developer Dashboard
  2. Create a new app
  3. In the app settings, add these redirect URIs:
    • http://localhost:3000/callback
    • http://your-domain.com:3000/callback (if deploying publicly)
  4. Copy the Client ID and Client Secret (Ensure you select Web API and Web Playback SDK)

Installation

Quick Deployment

# Clone Git repo
git clone https://github.com/SluberskiHomeLab/Enspotification.git
cd Enspotification

# Pull the latest image
docker pull sluberskihomelab/enspotification:latest

# Create .env file with your credentials
cp .env.example .env
# Edit .env with your Discord and Spotify tokens

# Start with production compose file
docker-compose  up -d

Option 2: Using Docker Run

docker run -d \
  --name enspotification \
  -p 3000:3000 \
  --env-file .env \
  --restart unless-stopped \
  sluberskihomelab/enspotification:latest

Usage

Discord Commands

Once the bot is running and invited to your server, use these slash commands:

  • /join - Connect your Spotify account and activate the bot as a playback device
  • /status - Check your connection status
  • /disconnect - Disconnect from Spotify
  • /voice-join - Join voice channel and create dedicated Spotify Connect device
  • /voice-leave - Leave voice channel and cleanup Spotify device
  • /voice-play <query> - Play Spotify music via voice channel Connect device
  • /voice-pause - Pause voice channel Spotify playback
  • /voice-resume - Resume voice channel Spotify playback
  • /voice-skip - Skip current Spotify track in voice channel
  • /voice-stop - Stop voice channel Spotify playback
  • /now-playing - Show current Spotify track info
  • /voice-volume <0-100> - Adjust Spotify Connect device volume

How It Works

  1. Connect: Use /join to get a personalized Spotify authorization link
  2. Authenticate: Click the link to connect your Spotify account
  3. Activate: The bot will appear as "Enspotification (Discord Bot)" in your Spotify Connect devices
  4. Control: Use Discord commands or select the device in your Spotify app for playbook