A self-hosted Discord bot that uses YT-DLP to play audio from YouTube, Spotify, direct links, and livestreams in your Discord voice channels.
- Multi-platform support (YouTube, Spotify, direct links)
- Multi-server support
- High-quality audio streaming
- Livestream support
- Playlist support
- Intergrated Sponsorblock
- Remove sponsor, intro, outro, selfpromo, interaction, and music offtopic from the audio
- Configurable via the config.json, by default it is disabled
- Basic controls (play, pause, skip)
- Queue management
- Loop mode with count option
- Shuffle functionality
- Real-time track information
- โก Advanced Caching System:
- Automated local caching for faster playback
- Skip YouTube queries for cached songs
- Intelligent cache management
- Reduced bandwidth usage
- YouTube search integration
- Spotify playlist parsing
- Genius lyrics integration
- Automatic FFmpeg setup
- Configurable auto-leave
- Download cleanup
- Role-based permissions
- Configurable command prefix
- Detailed logging system
- Auto-updates capability
โ ๏ธ Note: This bot is currently in development. While functional, it's recommended for use on a single private Discord server only.
- Install Python 3.8+
- Run
pip install -r requirements.txt - Rename
.env.exampleto.envand add your Discord token - Run
python bot.py
-
Python Installation
- Install Python 3.8 or higher
- Verify installation:
python --version
-
Dependencies
pip install -r requirements.txt
-
Discord Bot Token
- Rename
.env.exampleto.env - Add your token:
DISCORD_TOKEN=your_token_here
- Rename
-
Configuration
- Edit
config.jsonto set:- Owner ID
- Command Prefix
- Permissions
- Autoleave
- Default Volume
- Auto Clear Downloads
- Log Level
- UI Buttons
- Sponsorblock
- Edit
-
Spotify Integration
- Rename
.spotifyenv.exampleto.spotifyenv - Add credentials:
SPOTIPY_CLIENT_ID=your_client_id_here SPOTIPY_CLIENT_SECRET=your_client_secret_here - Get credentials from Spotify Developer Dashboard
- Rename
-
Genius Lyrics
- Edit
.geniuslyrics(created on first startup) - Add your Genius API credentials
- Edit
-
YouTube Authentication
- Install Get Cookies.txt extension
- Export cookies and place in root directory
- Learn more about cookies setup
!play [URL/search]- Play audio from URL or search!search [term]- Search YouTube for a song!pause- Pause playback!resume- Resume playback!stop- Stop and clear queue!skip- Skip current track!replay- Replay current track!random- Searches for a random song on YouTube!randomradio- Play a random radio station!loop [count]- Toggle loop mode (optional count)!nowplaying- Show current track info
!queue- Show queue!clear- Clear entire queue!clear [position]- Remove specific track!shuffle- Shuffle queue
!join/!summon- Join your channel!leave/!disconnect- Leave channel
!lyrics- Get lyrics for current song
!alias [add/remove/list]- Manage aliases!ping- Show bot status!version- Show bot version!log- Log current context!prefix- Change command prefix!restart- Restart bot (Owner)!logclear- Clear logs (Owner)!update- Update bot files (Owner)!cookie- Update cookies.txt (Owner)!help- Show all commands
-
FFmpeg Issues:
- Windows: Relaunch after first install
- macOS: Automatic installation
- Linux: Automatic installation
-
YouTube Sign-In Error/403 Error: Check/update cookies.txt
- Python 3.8+
- FFmpeg
- Stable internet connection
- Discord Bot Token
This project is licensed under the Unlicense. Giving the user complete freedom to use, modify, and distribute the software. This repository primarily uses yt-dlp, which is licensed under GPL-2.0. This repository does not bundle or modify yt-dlpโit only installs it if necessary. For more information, visit: https://github.com/yt-dlp/yt-dlp.