MOZGIII/musicbot2

Where to set DISCORD_TOKEN at ?

Maltahl opened this issue · 6 comments

Where is env to set the DISCORD token at ?

It's a basic concept, you can learn it here: https://en.wikipedia.org/wiki/Environment_variable
If you want a quick solution, try https://crates.io/crates/dotenv-exec

Or, if you're on linux or mac, or windows under WSL:

DISCORD_TOKEN=<your token> cargo run

You might need other env vars though.

Thanks for the quick reply.

If i were to run this as a standalone bot without external LAVALINK_HOST what env would you use ? or is this an additional requirement ?

This bot needs lavalink to run somewhere. If you run it locally just pass 127.0.0.1:<port>.

Here's a sample config:

LAVALINK_PORT=2223
LAVALINK_HOST="127.0.0.1:${LAVALINK_PORT}"
LAVALINK_SERVER_PASSWORD="secret"
LAVALINK_AUTHORIZATION="$LAVALINK_SERVER_PASSWORD"
RUST_BACKTRACE=1

There's a utility script at bin/lavalink to run the lavalink via docker - might be helpful.

This bot needs lavalink to run somewhere. If you run it locally just pass 127.0.0.1:<port>.

Here's a sample config:

LAVALINK_PORT=2223
LAVALINK_HOST="127.0.0.1:${LAVALINK_PORT}"
LAVALINK_SERVER_PASSWORD="secret"
LAVALINK_AUTHORIZATION="$LAVALINK_SERVER_PASSWORD"
RUST_BACKTRACE=1

There's a utility script at bin/lavalink to run the lavalink via docker - might be helpful.

Ahh this is where i fail in my usage.

I tried to run it directly on a LXC ( not major fan of docker)

Yeah, if you want to use LXC you'd have to take care of java and the rest of the lavalink setup yourself.

If you don't like docker, I suggest you try podman.

Closing this, as the subject seems resolved.
I'll add readme in a bit, feel free to ask here if you need more help on this matter.