2024-03-01 18:08:46 -05:00
2026-09-19 18:26:34 -04:00
2026-09-19 18:26:34 -04:00
2024-08-01 09:10:04 -04:00
2026-09-19 18:26:34 -04:00
2026-09-19 18:26:34 -04:00
2021-09-15 18:09:07 -04:00
2017-05-21 10:17:44 -04:00
2026-09-19 18:26:34 -04:00
2026-09-19 18:26:34 -04:00
2026-09-19 18:26:34 -04:00
2026-09-19 18:26:34 -04:00

JMusicBot (TrueOG Network fork)

A self-hosted Discord music bot, forked by the TrueOG Network from chrisb09/MusicBot, which is in turn a modernised fork of jagrosh/MusicBot.

The upstream fork keeps the bot working on current Discord, JDA, and YouTube; this fork keeps it running on TrueOG's infrastructure.

TrueOG Network Fork Changes

  • Maven Wrapper (./mvnw) so builds use a pinned Maven version instead of whatever is installed
  • Selenium bumped to 4.49.0 with the CDP v153 devtools module, so YouTube PO-token extraction works with current Chromium
  • maven-shade-plugin now merges META-INF/services, so bundled CdpInfo (and other SPI) registrations are no longer silently dropped from the fat jar
  • YouTube PO-token capture handles the gzip-compressed /youtubei/v1/player request body that YouTube web client 2.20260918+ sends, and logs a warning instead of silently timing out when the body cannot be parsed

Inherited From Upstream (chrisb09)

  • JDA 6 support and current dependency updates
  • DAVE voice encryption support for current Discord voice requirements
  • Optional YouTube account login, PO token, and visitor-data support
  • Optional per-channel playback status message
  • Optional JDBC/SQLite playback analytics logging
  • Regular lavaplayer/lavalink bumps

Features

  • Easy self-hosting
  • Fast song loading
  • Smooth playback
  • DJ role and server-specific settings
  • Queue management and playlist support
  • Support for many sources, streams, and local files

Supported Sources And Formats

JMusicBot supports all sources and formats supported by lavaplayer.

Sources:

  • YouTube
  • SoundCloud
  • Bandcamp
  • Vimeo
  • Twitch streams
  • Local files
  • HTTP URLs

Formats:

  • MP3
  • FLAC
  • WAV
  • Matroska/WebM
  • MP4/M4A
  • OGG streams
  • AAC streams
  • Stream playlists such as M3U and PLS

Building

./mvnw clean package

The runnable jar is written to target/JMusicBot-<version>-All.jar.

Setup Notes

  1. Create a Discord bot and get its token, see here.
  2. Enable the MESSAGE_CONTENT intent in the Discord Developer Portal here (Wiki link).
  3. Configure config.txt.
  4. Run the jar: java -Dnogui=true -jar target/JMusicBot-<version>-All.jar

For the detailed version, see docs/setup.md.

YouTube Playback

YouTube requires a PO token, which the bot obtains at startup by driving a headless Chromium through Selenium. Chromium must be installed, and the bundled Selenium CDP module must match the installed Chromium major version (currently v153 — see pom.xml). If Chromium is upgraded past that, bump selenium-java and the selenium-devtools-vNNN exclusions in pom.xml and rebuild.

Google account login is also supported as a fallback:

youtubeoauth2=true

Do not use your main Google account. Use a burner or otherwise disposable account instead. Details are in docs/setup.md.

DAVE / Voice Encryption

Discord requires DAVE for voice on modern API versions. The bot configures libdave-jvm during startup and bundles native binaries for common Linux, Windows, and macOS targets.

If you deploy on an unsupported architecture, add the matching native dependency in pom.xml.

This fork incorporates ideas and patches related to:

S
Description
🎶 A Discord music bot that's easy to set up and run yourself!
https://jmusicbot.com
Readme Apache-2.0
5.5 MiB
0 Stars 2 Watchers 0 Forks
Languages
Java 99.8%
Shell 0.2%