Welcome to NaviMusic, a highly user-friendly music bot for Discord. Now rebuilt with Kotlin and Spring Boot, NaviMusic offers a seamless and robust music experience for your Discord server.
- Getting Started
- Prerequisites
- Configuration
- Available Commands
- Running the Application
- Running the Application with Docker
- Production Mode
- License
This section provides a guide on how to get NaviMusic up and running on your local machine.
Before you begin, ensure you have the following installed:
- Java 25 (Required for DAVE/JDave encryption)
- Maven
- Docker (Optional)
NaviMusic uses environment variables for configuration. You can also set these in src/main/resources/application.properties.
| Variable | Description |
|---|---|
DISCORD_TOKEN |
Your Discord Bot Token. |
SPOTIFY_CLIENT_ID |
Your Spotify Application Client ID. |
SPOTIFY_CLIENT_SECRET |
Your Spotify Application Client Secret. |
YOUTUBE_POTOKEN |
YouTube PO Token. |
YOUTUBE_VISITOR |
YouTube Visitor ID. |
YOUTUBE_OAUTH2 |
YouTube OAuth2 Code. |
Note: For YouTube credentials, use a PO Token generator. If
YOUTUBE_OAUTH2is missing, follow the console instructions on the first run to authenticate.
NaviMusic uses Slash Commands for easy interaction.
/play [query]- Play a song or playlist from YouTube/Spotify./skip- Skip the current track./queue- View the current music queue./nowplaying- Show details of the currently playing track./pause- Pause playback./resume- Resume playback./clear- Clear the queue./leave- Make the bot leave the voice channel./repeat- Enable track repetition./repeatoff- Disable track repetition./shuffle- Shuffle the current queue.
/help- List all available commands./roll [sides]- Rolls a die with a specified number of sides (default is 6).
Important for Java 25: Due to the use of Discord's DAVE protocol (E2EE) through the JDave library, you must include the --enable-native-access=ALL-UNNAMED flag in your Java execution command.
- Build the project:
mvn clean package
- Run the JAR:
java --enable-native-access=ALL-UNNAMED -jar target/NaviMusic-x.x.x.jar {nogui}{nogui}is an optional argument to disable the console GUI.
The Docker image includes the necessary Java 25 flags and environment variable support.
docker build -t navimusic-bot .
docker run --env-file .env navimusic-botFor production environments, NaviMusic includes a prod profile that silences verbose "Song Added" logs, showing only Warnings and Errors to keep the console clean.
The Dockerfile automatically activates the prod profile. To run it:
docker run -d --restart always --env-file .env --name navimusic anvian/navi-musicIf running the JAR manually, add the profile flag:
java --enable-native-access=ALL-UNNAMED -jar target/NaviMusic-x.x.x.jar nogui --spring.profiles.active=prodThis project is licensed under the GNU General Public License Version 3. See the LICENSE file for details.