explaingit

jagrosh/musicbot

5,740JavaAudience · generalComplexity · 2/5LicenseSetup · moderate

TLDR

JMusicBot is a self-hosted Discord music bot that lets server members queue and play songs from YouTube, SoundCloud, and other sources together in voice channels, no paid service required.

Mindmap

mindmap
  root((JMusicBot))
    What it does
      Queue songs
      Play audio
      Stream radio
      DJ role control
    Sources
      YouTube
      SoundCloud
      Local files
      Twitch streams
    Tech stack
      Java runtime
      JDA library
      lavaplayer audio
    Setup
      Discord bot token
      Self-hosted server
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a music bot to your Discord server so members can queue and play songs together in voice channels.

USE CASE 2

Stream YouTube or SoundCloud playlists to a Discord voice channel without paying for a hosted service.

USE CASE 3

Host your own DJ bot with role-based controls so only designated members can skip or clear the queue.

USE CASE 4

Stream online radio stations continuously to your Discord community.

Tech stack

JavaJDAlavaplayer

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a Discord Bot token from the Developer Portal and Java installed on the host machine.

Apache 2.0, use, modify, and distribute freely including for commercial purposes with attribution.

In plain English

JMusicBot is a music bot for Discord, the voice and text chat platform popular with gaming communities and online groups. You add it to a Discord server and it joins voice channels to play audio, letting people in the server queue up songs and listen together. The project is self-hosted, meaning you download it and run it on your own computer or server rather than paying for a third-party service. Setting it up requires Java to be installed on your machine, and a Discord Bot token from Discord's developer portal, but no other external API keys are needed. Once running, the bot loads songs quickly and plays them with smooth audio. It supports a long list of sources: YouTube, SoundCloud, Bandcamp, Vimeo, Twitch streams, local files on your computer, and plain HTTP audio URLs. Supported formats include MP3, FLAC, WAV, OGG, AAC, and various streaming playlist formats. The bot includes a role-based permission system. Server owners can designate a DJ role that gets special control over the music queue, so not just anyone can skip or clear songs. The interface within Discord uses clean menus rather than raw command output, which makes it easier to follow what is playing or what is queued. Playlist support covers both YouTube and SoundCloud playlists as well as locally stored playlist files. Online radio streams are also supported, so the bot is not limited to on-demand tracks. The source code is public and licensed under Apache 2.0, but the README notes that editing it is not straightforward for less experienced programmers. It relies on two Java libraries, JDA (for connecting to Discord) and lavaplayer (for audio handling). The recommended path for most users is to download a release and run it as-is rather than modifying the code.

Copy-paste prompts

Prompt 1
Walk me through setting up JMusicBot on a Linux server, I have Java installed, what config file do I edit and what Discord bot token do I need?
Prompt 2
How do I create a DJ role in my Discord server and configure JMusicBot to give that role special queue control permissions?
Prompt 3
I want JMusicBot to autoplay a YouTube playlist when the bot starts. How do I configure that?
Prompt 4
What audio formats and sources does JMusicBot support? Can it play FLAC files from a local folder on the server?
Open on GitHub → Explain another repo

← jagrosh on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.