fixed readme
CI/CD / build (push) Successful in 44s
CI/CD / deploy (push) Successful in 8s

This commit is contained in:
2026-07-10 01:34:33 +02:00
parent f70a50c06f
commit 64a472c540
+12 -7
View File
@@ -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 <song or url>`.
@@ -77,8 +82,8 @@ voice channel in your server and try `/play <song or url>`.
- [ ] 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