fixed readme
This commit is contained in:
@@ -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`.
|
comes from the `youtube-plugin`, configured in `lavalink/application.yml`.
|
||||||
|
|
||||||
- Bot: Java + Gradle (JDA 6, `lavalink-client`)
|
- Bot: Java + Gradle (JDA 6, `lavalink-client`)
|
||||||
- Music server: Lavalink v4 via `docker-compose.yml`
|
- Music server: Lavalink v4 via `docker-compose.yaml`
|
||||||
|
|
||||||
## Requirements
|
## 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)
|
- Docker + Docker Compose (to run the Lavalink server)
|
||||||
- A Discord bot token
|
- A Discord bot token
|
||||||
|
|
||||||
@@ -58,15 +58,20 @@ cp .env.example .env
|
|||||||
So load it into your shell first.
|
So load it into your shell first.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1. Start the Lavalink server (first run downloads the YouTube plugin; wait for "ready")
|
# 1. Start ONLY the Lavalink server — not the bot container — so it doesn't clash
|
||||||
docker compose up -d
|
# with the bot you're running from source. (First run downloads the YouTube
|
||||||
docker compose logs -f # wait for "Lavalink is ready to accept connections", then Ctrl+C
|
# 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
|
# 2. Load your .env and run the bot
|
||||||
set -a; source .env; set +a
|
set -a; source .env; set +a
|
||||||
./gradlew run
|
./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
|
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>`.
|
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
|
- [ ] Invite the bot to your server with the `bot` and `applications.commands` scopes
|
||||||
(and the **Connect** + **Speak** voice permissions)
|
(and the **Connect** + **Speak** voice permissions)
|
||||||
- [ ] Enable Developer Mode in Discord and copy your server's **Guild ID**
|
- [ ] Enable Developer Mode in Discord and copy your server's **Guild ID**
|
||||||
- [ ] `cp .env.example .env` and fill in `BOT_TOKEN` (and `GUILD_ID`)
|
- [ ] `cp .env.example .env` and fill in `BOT_TOKEN`, `LAVALINK_PASSWORD` (and `GUILD_ID`)
|
||||||
- [ ] Start Lavalink: `docker compose up -d` and wait until the logs say it's ready
|
- [ ] 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`
|
- [ ] Load env vars: `set -a; source .env; set +a`
|
||||||
- [ ] Run the bot: `./gradlew run`
|
- [ ] Run the bot: `./gradlew run`
|
||||||
- [ ] In Discord, run `/hello` to confirm it responds, then `/play` from a voice channel
|
- [ ] In Discord, run `/hello` to confirm it responds, then `/play` from a voice channel
|
||||||
|
|||||||
Reference in New Issue
Block a user