Skip to content

Repository files navigation

RbotLite (A tiny Discord bot)

Configuration

Each environment requires two separate env files. This is intentional: the PostgreSQL container should not receive DISCORD_BOT_TOKEN.

Purpose Development Production
Bot and database connection .config/dev/.env.dev .config/prod/.env.prod
PostgreSQL only .config/dev/.env.postgres.dev .config/prod/.env

Create them from the templates:

cp .config/.env.example .config/dev/.env.dev
cp .config/.env.postgres.example .config/dev/.env.postgres.dev

cp .config/.env.example .config/prod/.env.prod
cp .config/.env.postgres.example .config/prod/.env

The corresponding values must match between the files:

Bot PostgreSQL
POSTGRES_USERNAME POSTGRES_USER
POSTGRES_PASSWORD POSTGRES_PASSWORD
POSTGRES_DATABASE POSTGRES_DB

Installing dependencies

pip install uv
uv pip install -e .

Optional dependencies

uv pip install -e ".[lint]"

Launching the bot

Development

just dev

Production

just prod

Configuring admin voice

After adding the bot to a new server, a server administrator must run:

/admin_voice setup

This command stores the administrator role, target voice channel, request channel, and cooldown in PostgreSQL. Users can then submit a request with:

/admin_voice request

Requests themselves are not stored in the database. They stop being active after the bot restarts or the message containing their buttons expires.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages