57 lines
2.0 KiB
Markdown
57 lines
2.0 KiB
Markdown
# CaitSith
|
|
|
|

|
|
|
|
Designed and developed by Wyatt J. Miller
|
|
|
|
Copyright 2025-2026, all rights reserved
|
|
|
|
Licensed by the Eclipse Public License 2.0 (EPL-2.0). See [LICENSE.md](./LICENSE.md) for the full text.
|
|
|
|
## Description
|
|
|
|
This bot gives a user the ability to "deathroll" or roll random dice (e.g. D20). This bot can either run on Discord or Matrix.
|
|
|
|
## Building
|
|
|
|
Requirements:
|
|
|
|
- Rust (built on 1.93, 2024 edition)
|
|
- pkg-config (most Linux distributions have this already by default)
|
|
|
|
Run the following command to get a binary:
|
|
|
|
```bash
|
|
cargo build --release
|
|
```
|
|
|
|
If you are running `nix` or NixOS, you should probably run the provided `flake.nix`. The build's result will be the bot itself.
|
|
|
|
Running the binary by itself won't do anything. In fact, the bot will just quit if you don't have the needed information. You will need to have the following:
|
|
|
|
- A Discord token - `DISCORD_TOKEN`
|
|
- A guild ID - `GUILD_ID`
|
|
|
|
_OR_
|
|
|
|
- A Matrix homeserver (or admin access to one) - `MATRIX_HOMESERVER`
|
|
- A Matrix username - `MATRIX_USERNAME`
|
|
- A Matrix password - `MATRIX_PASSWORD`
|
|
|
|
Those will be environment variables. Configure them based on how you're deploying the bot—whether that's in your .bashrc, docker-compose.yml, systemd service file, etc. They need to be defined _somewhere_ in your environment.
|
|
|
|
## Hacking
|
|
|
|
Requirements:
|
|
|
|
- Rust (built on 1.93, 2024 edition)
|
|
- git
|
|
- pkg-config
|
|
- openssl-devel
|
|
|
|
If you are running `nix` or NixOS, you should probably run the provided `flake.nix`
|
|
|
|
## Inspiration
|
|
|
|
After someone in Final Fantasy XIV mentioned how useful the `/random` command would be in Discord, I decided to create a bot to make that a reality. The bot features original code written by yours truly (though it wasn't initially tracked with `git`). I named the bot after Cait Sith, a character from Final Fantasy VII, whose class and personality made him a fitting namesake for this randomization bot.
|