Skip to content

Commit 9c10cc3

Browse files
committed
can now specify lavalink connection settings
1 parent 1d1873e commit 9c10cc3

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ All of the configuration is done using environment variables.
2020
### Optional
2121

2222
- `GUILD_ID` - The ID of the guild you want the bot to sync commands to. (Likely only required if you are developing the bot)
23+
- `LAVALINK_NODE_ADDRESS` - The address of the Lavalink server to connect to. (Defaults to `localhost:2333`)
24+
- `LAVALINK_NODE_PASSWORD` - The password for the Lavalink server. (Defaults to `youshallnotpass`)
25+
- `LAVALINK_NODE_NAME` - The name of the Lavalink node. (Defaults to `default`)

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ services:
33
image: ghcr.io/shitcorp/apollo
44
environment:
55
DISCORD_TOKEN: "your token here"
6+
LAVALINK_NODE_ADDRESS: "lavalink:2333"
7+
LAVALINK_NODE_PASSWORD: "youshallnotpass"
8+
depends_on:
9+
- lavalink
610

711
lavalink:
812
image: ghcr.io/lavalink-devs/lavalink:4
9-
container_name: lavalink
1013
environment:
1114
_JAVA_OPTIONS: "-Xmx500M"
1215
SERVER_PORT: "2333"

internal/bot/bot.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ func (b *MusicBot) Start(ctx context.Context) error {
183183
// defer b.Client.Close(ctx)
184184

185185
node, err := b.Lavalink.AddNode(ctx, disgolink.NodeConfig{
186-
Name: "test",
187-
Address: "localhost:2333",
188-
Password: "youshallnotpass",
186+
Name: k.String("lavalink.node.name"),
187+
Address: k.String("lavalink.node.address"),
188+
Password: k.String("lavalink.node.password"),
189189
Secure: false,
190190
})
191191
if err != nil {

0 commit comments

Comments
 (0)