Posts new FIA Documents (https://fia.com/documents) to Discord.
https://legal.ort.dev/fia-docs-bot.html
- Rust 85%
- HTML 11.9%
- Python 3.1%
| .github/workflows | ||
| docker | ||
| screenshots | ||
| src | ||
| tools | ||
| .dockerignore | ||
| .gitignore | ||
| .tmux | ||
| Cargo.lock | ||
| Cargo.toml | ||
| compose.dev.yaml | ||
| compose.yaml | ||
| deny.toml | ||
| fia-docs-bot.html | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| readme.md | ||
| rustfmt.toml | ||
FIA Documents Bot
A Public Discord bot that automatically posts new FIA Documents to Discord inside a new thread.
Features
- Create a new Thread for each new Event.
- Post Documents with up to four Pages as previews.
- Notify Roles together with new Documents.
- Quick Setup using a slash command.
Installation
Click here to add this bot to your Discord server.
If you do want to make it your own, you can easily run everything using docker compose.
Configuration
This app is configured using environment variables. If available the app will load a .env file.
Here is an example .env file:
DISCORD_TOKEN=<Discord bot Token>
DATABASE_TOKEN=<Libsql JWT>
SENTRY_DSN=<Sentry DSN for error Reporting>
Docker
This app is fully dockerized and can be used with docker compose.
Here is an example docker-compose.yaml that hosts:
- A Libsql Database
- The Discord Bot
- The FIA-Docs-Scraper which provides data
services:
libsql-database:
image: ghcr.io/tursodatabase/libsql-server:latest
volumes:
- ./data/libsql:/var/lib/sqld
container_name: database
env_file: ./.db.env
discord-bot:
image: ghcr.io/markustheort/fia-docs-bot:latest
container_name: fia-docs-bot
restart: unless-stopped
env_file: ./.bot.env
environment:
- DATABASE_URL=http://database:8080
depends_on:
- libsql-database
docs-scraper:
image: codeberg.org/mto/fia-docs-scraper:latest
container_name: fia-docs-scraper
restart: unless-stopped
env_file: ./.scraper.env
environment:
- DATABASE_URL=http://database:8080
depends_on:
- libsql-database
stop_grace_period: 30s
Screenshots
Tech Stack
- Rust with Tokio
- serenity-rs for Discord interactions
- Libsql for Data Storage
- FIA-Docs-Scraper as data provider
- Sentry for error reporting
