A lightweight, ultra-efficient Discord music bot designed specifically for low-resource devices (ARM64 processors, Raspberry Pi, postmarketOS) and standard commercial VPS servers (x86_64).
Built with Python 3.11, discord.py, yt-dlp, and spotipy. Utilizes native system FFmpeg integration, running at under 60 MB RAM and eliminating legacy Java runtime bottlenecks.
- 🚀 Multi-Architecture Native Support – Full compatibility with ARM64 (Raspberry Pi, postmarketOS) and x86_64 (Standard VPS, Synology, Unraid).
- 🎶 Multi-Source Audio – Playback from YouTube (single tracks & full playlists) and keyword search (
ytsearch). - 🟢 Spotify Integration – Converts Spotify tracks and playlist URLs into YouTube streams automatically.
- 🔀 Shuffle & Queue System – Randomize current playback queue (
!shuffle) with seamless track transitions. - 🐳 Containerized & 12-Factor Ready – Isolated Docker environment utilizing an
.envfile for secret management.
| Command | Description | Example |
|---|---|---|
!play <url / query> |
Plays audio from YT, queues YT/Spotify playlists, or searches by phrase. | !play Metallica One |
!shuffle |
Randomly shuffles the current queue. | !shuffle |
!skip |
Skips the currently playing track. | !skip |
!stop |
Stops playback, clears the queue, and disconnects the bot. | !stop |
git clone [https://github.com/YOUR_USERNAME/your-repo-name.git](https://github.com/YOUR_USERNAME/your-repo-name.git)
cd your-repo-nameCreate a .env file in the root directory:
cp .env.example .env
nano .envFill in your secrets:
DISCORD_TOKEN=your_discord_bot_token_here
SPOTIPY_CLIENT_ID=your_spotify_client_id_here
SPOTIPY_CLIENT_SECRET=your_spotify_client_secret_heredocker compose up -d --buildsudo apt update && sudo apt upgrade -y
curl -fsSL [https://get.docker.com](https://get.docker.com) -o get-docker.sh
sudo sh get-docker.shgit clone [https://github.com/YOUR_USERNAME/your-repo-name.git](https://github.com/YOUR_USERNAME/your-repo-name.git)
cd your-repo-name
cp .env.example .env
nano .env
docker compose up -d --buildLekki, ultra-wydajny bot muzyczny na Discorda zaprojektowany z myślą o urządzeniach o ograniczonych zasobach (procesory ARM64, Raspberry Pi, postmarketOS) oraz komercyjnych serwerach VPS (x86_64).
Zbudowany w oparciu o Python 3.11, discord.py, yt-dlp oraz spotipy. Wykorzystuje bezpośrednią integrację z natywnym FFmpeg, zużywając poniżej 60 MB RAM i eliminując problemy z przestarzałymi silnikami Javy.
- 🚀 Natywna wieloplatformowość (Multi-Arch) – Pełna kompatybilność z ARM64 (Raspberry Pi, postmarketOS) oraz x86_64 (Standardowe VPS-y, Synology, Unraid).
- 🎶 Obsługa wielu źródeł – Odtwarzanie z YouTube (pojedyncze utwory i playlisty) oraz wyszukiwanie fraz słownych (
ytsearch). - 🟢 Integracja ze Spotify – Automatyczne konwertowanie linków utworów i playlist ze Spotify na odpowiedniki z YouTube.
- 🔀 Funkcja Shuffle & Queue – Losowe mieszanie kolejki (
!shuffle) oraz automatyczne przechodzenie do kolejnych utworów. - 🐳 Pełna konteneryzacja – Izolowane środowisko z plikiem
.env(12-Factor App methodology).
| Komenda | Opis | Przykład |
|---|---|---|
!play <link / fraza> |
Odtwarza utwór z YT, dodaje playlistę YT/Spotify lub szuka po nazwie. | !play sanah szampan |
!shuffle |
Losowo miesza aktualną kolejkę utworów. | !shuffle |
!skip |
Pomija aktualnie grany utwór i przechodzi do następnego. | !skip |
!stop |
Zatrzymuje odtwarzanie, czyści kolejkę i odłącza bota od kanału. | !stop |
git clone [https://github.com/TWOJA_NAZWA_UZYTKOWNIKA/nazwa-twojego-repo.git](https://github.com/TWOJA_NAZWA_UZYTKOWNIKA/nazwa-twojego-repo.git)
cd nazwa-twojego-repoStwórz plik .env w głównym katalogu projektu:
cp .env.example .env
nano .envUzupełnij go swoimi danymi:
DISCORD_TOKEN=your_discord_bot_token_here
SPOTIPY_CLIENT_ID=your_spotify_client_id_here
SPOTIPY_CLIENT_SECRET=your_spotify_client_secret_heredocker compose up -d --buildsudo apt update && sudo apt upgrade -y
curl -fsSL [https://get.docker.com](https://get.docker.com) -o get-docker.sh
sudo sh get-docker.shgit clone [https://github.com/TWOJA_NAZWA_UZYTKOWNIKA/nazwa-twojego-repo.git](https://github.com/TWOJA_NAZWA_UZYTKOWNIKA/nazwa-twojego-repo.git)
cd nazwa-twojego-repo
cp .env.example .env
nano .env
docker compose up -d --build├── .env # Environment variables (git-ignored)
├── .env.example # Template for environment variables
├── .gitignore # Git ignore rules
├── bot.py # Main bot application (Python 3.11)
├── Dockerfile # Image build instructions (python:3.11-slim + FFmpeg)
├── docker-compose.yml # Service orchestration file
└── README.md # Documentation
MIT License. Free for personal use and modification.