Crates.io | secubot |
lib.rs | secubot |
version | 2.9.0 |
source | src |
created_at | 2022-10-18 00:09:13.454578 |
updated_at | 2024-01-19 04:00:22.371345 |
description | Yet another Discord bot! |
homepage | |
repository | https://github.com/seqre/secubot |
max_upload_size | |
id | 690498 |
size | 138,839 |
I'm not a programmer until I write my own Discord bot, right? And what is the best programming language to do so, if not Rust?
The bot was written at first out of the Cyber Warriors' need for a ping cannon replacement, and over time I just kept adding new features.
TODO
Build the image locally with docker build .
or pull ghcr.io/seqre/secubot
image.
Use the following command to quickly run the bot to test it:
docker run -e SCBT__DISCORD_TOKEN="token" secubot:latest
To have local persistent SQLite database, run:
touch db.sqlite // we need to create file first as docker cannot mount non-existing file
docker run \
-v ${PWD}/db.sqlite:/db.sqlite \ // mount `db.sqlite` to have persistent database
-e SCBT__DISCORD_TOKEN="token" \ // provide Discord token
--name secubot \
secubot:latest
To use proper config file(s), add the following mounts:
touch db.sqlite
docker run \
-v ${PWD}/config.yaml:/config.yaml:ro \ // mount `config.yaml` file as singular configuration file
-v ${PWD}/config:/config:ro \ // mount whole `config/` directory if you need to have multiple configuration files
-v ${PWD}/db.sqlite:/db.sqlite \ // mount `db.sqlite` to have persistent database
--name secubot \
secubot:latest
You can use any format that config-rs supports, YAML is given as an example.
TODO