🎵 High Fidelity Audio • ⚡ Sub-Second Playback (< 1ms Cache Hits) • 🤖 45+ Slash & 49+ Message Commands • 🎛️ Interactive Controller • 🔁 24/7 Autoresume
JUGNU MUSIC is an open-source, production-grade Discord music bot engineered for speed, stability, and premium audio quality. Built on Discord.js v14 and DisTube, it features an optimized playback pipeline with in-memory LRU caching, SingleFlight request deduplication, and a custom yt-dlp extractor engine with Android client spoofing to bypass YouTube bot blocks and signature errors.
- Instant Search & Stream Caching: Sub-second queries and <1ms instant cache hits using smart in-memory LRU storage.
- YouTube, Spotify & SoundCloud: Native multi-source playback with playlist and mix-radio support.
- Custom
yt-dlpExtractor: Android client API emulation avoidsCould not parse n transformerrors and datacenter bot challenges. - SingleFlight Deduplication: Eliminates redundant network calls during high concurrent usage.
- Rich Button Controls: Skip, Pause/Resume, Stop, Loop, Shuffle, Volume, and Equalizer directly from message components.
- Dedicated Request Channel: Clean song request channel system with persistent player embeds.
- 24/7 Voice Channel & Auto-Resume: Automatically rejoins and restores queues upon bot restarts or crashes.
- Audio Filters & Effects: BassBoost, 8D, Nightcore, Vaporwave, Tremolo, Phaser, and custom equalizer settings.
- Custom Playlists: Create, save, edit, and play personal user playlists stored in persistent database.
- Lyrics & Info: Real-time synced lyrics lookup and detailed track metadata.
📦 How to install FFmpeg on your OS
- Ubuntu / Debian:
sudo apt update && sudo apt install -y ffmpeg - Arch Linux:
sudo pacman -S ffmpeg - macOS (Homebrew):
brew install ffmpeg - Windows (Winget / Chocolatey):
winget install Gyan.FFmpeg # or choco install ffmpeg
-
Clone the repository:
git clone https://github.com/kabirjaipal/JUGNU-MUSIC.git cd JUGNU-MUSIC -
Install dependencies:
npm install
-
Configure Environment Variables: Copy
.env.exampleto.env:cp .env.example .env
Open
.envand fill in your details:# Discord Bot Token & Prefix TOKEN=YOUR_DISCORD_BOT_TOKEN PREFIX=!! # Database (Optional - Uses fast JSON storage by default if omitted) MONGO_URL= # Slash Command Deployment # Provide your server ID for instant command loading, or set SLASH_GLOBAL=true GUILD_ID=YOUR_DISCORD_SERVER_ID SLASH_GLOBAL=false # Express Keep-Alive Port PORT=3000
-
Start the bot:
npm start
(For development with auto-reload:
npm run dev)
🎵 Music Commands
| Command | Description |
|---|---|
/play <song> |
Plays a song or playlist from YouTube, Spotify, or SoundCloud |
/pause & /resume |
Pauses or resumes current playback |
/skip |
Skips the current track |
/stop |
Stops playback and clears the queue |
/queue |
Displays current songs in queue |
/nowplaying |
Shows detailed info about the currently playing song |
/loop <mode> |
Loops single song, entire queue, or disables loop |
/shuffle |
Randomizes the queue order |
/volume <1-150> |
Adjusts playback volume |
/seek <seconds> |
Jumps to a specific timestamp in the track |
/filter <name> |
Applies audio effects (Bassboost, Nightcore, 8D, etc.) |
/remove <index> |
Removes a track at a specific index from queue |
/jump <index> |
Skips directly to a song in the queue |
/lyrics [song] |
Displays lyrics for the current or requested song |
📑 Playlist Commands
| Command | Description |
|---|---|
/playlist create <name> |
Creates a new custom playlist |
/playlist savecurrent <name> |
Saves currently playing song to playlist |
/playlist savequeue <name> |
Saves current entire queue to playlist |
/playlist play <name> |
Plays a custom saved playlist |
/playlist list |
Lists all your saved playlists |
/playlist delete <name> |
Deletes a custom playlist |
⚙️ Settings & Utility Commands
| Command | Description |
|---|---|
/setupmusic |
Sets up a dedicated music request channel |
/247 |
Toggles 24/7 voice channel mode |
/autoresume |
Toggles queue auto-resume on bot restarts |
/dj |
Configures the DJ role for music commands |
/ping |
Displays bot latency and WebSocket ping |
/stats |
Shows system and resource usage stats |
Discord Interaction / Message
│
▼
Client Router ───────────────► In-Memory LRU Cache (<1ms)
│ │
▼ (Cache Miss) ▼
InnerTube API / yt-search ──────► Audio Stream Cache
│
▼
DisTube Audio Pipeline ◄───── Custom yt-dlp Android Extractor
│
▼
FFmpeg Audio Stream ────────► Discord Voice Gateway
Contributions, bug reports, and feature requests are welcome!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Made with ❤️ by Kabir Jaipal & Contributors