From 64a472c5404d73016fa89cd11d358754bcc91a2f Mon Sep 17 00:00:00 2001 From: Ksan Date: Fri, 10 Jul 2026 01:34:33 +0200 Subject: [PATCH] fixed readme --- README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 385e2f6..e039676 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,11 @@ The bot is just a **Lavalink client** — actual audio is streamed by a separate comes from the `youtube-plugin`, configured in `lavalink/application.yml`. - Bot: Java + Gradle (JDA 6, `lavalink-client`) -- Music server: Lavalink v4 via `docker-compose.yml` +- Music server: Lavalink v4 via `docker-compose.yaml` ## Requirements -- A recent JDK (Java 17+; use the latest LTS if the build complains) +- A JDK (builds on Java 17+; CI and the Docker image use Java 25) - Docker + Docker Compose (to run the Lavalink server) - A Discord bot token @@ -58,15 +58,20 @@ cp .env.example .env So load it into your shell first. ```bash -# 1. Start the Lavalink server (first run downloads the YouTube plugin; wait for "ready") -docker compose up -d -docker compose logs -f # wait for "Lavalink is ready to accept connections", then Ctrl+C +# 1. Start ONLY the Lavalink server — not the bot container — so it doesn't clash +# with the bot you're running from source. (First run downloads the YouTube +# plugin; wait for "ready".) +docker compose up -d lavalink +docker compose logs -f lavalink # wait for "Lavalink is ready to accept connections", then Ctrl+C # 2. Load your .env and run the bot set -a; source .env; set +a ./gradlew run ``` +> `docker compose up -d` (no service name) would start the **bot container too**, +> giving you two bots. For source development, always pass `lavalink` explicitly. + When it connects you'll see `Bot connected and ready as ...` in the console. Then join a voice channel in your server and try `/play `. @@ -77,8 +82,8 @@ voice channel in your server and try `/play `. - [ ] Invite the bot to your server with the `bot` and `applications.commands` scopes (and the **Connect** + **Speak** voice permissions) - [ ] Enable Developer Mode in Discord and copy your server's **Guild ID** -- [ ] `cp .env.example .env` and fill in `BOT_TOKEN` (and `GUILD_ID`) -- [ ] Start Lavalink: `docker compose up -d` and wait until the logs say it's ready +- [ ] `cp .env.example .env` and fill in `BOT_TOKEN`, `LAVALINK_PASSWORD` (and `GUILD_ID`) +- [ ] Start Lavalink only: `docker compose up -d lavalink` and wait until the logs say it's ready - [ ] Load env vars: `set -a; source .env; set +a` - [ ] Run the bot: `./gradlew run` - [ ] In Discord, run `/hello` to confirm it responds, then `/play` from a voice channel