| pg13 | ||
| .envrc | ||
| .gitignore | ||
| config.example.toml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
PG-13
A Discord bot that keeps track of points from a variety of sources.
I don't expect this to be useful to anyone, but hey, if it is that's great :)
Features
- Score tracking through server-specific leaderboards
- Manual score management when you want to
punish your enemiesreward specific users - Assignment of special roles to the users with the most points
- Daily point rewards for both messages in configurable text channels and via a command
- Game nights with points awarded based on how long someone stays in a call for
Configuration
An example configuration is included in this repository
which shows the structure that PG-13 expects when running. The bot expects its
configuration to be supplied as a
systemd credential with the name config.toml.
If the services.pg-13.configFile option is set, this is handled automatically;
otherwise you can set it up manually using something like the SetCredential
service option.
If you're using NixOS, something like agenix
can be useful for managing your PG-13 configuration. Just set
services.pg-13.configFile to be the path attribute of the corresponding
secret.
Installation
NixOS with flakes
Just add the following to your system configuration flake:
{
inputs.pg-13.url = "git+https://ctrl.senn.gay/senn/pg-13?ref=v1.2.1";
outputs = { self, nixpkgs, pg-13 }: {
nixosConfigurations.example = nixpkgs.lib.nixosSystem {
modules = [
pg-13.nixosModules.default
({
services.pg-13.enable = true;
# optional but recommended
# automatically sets up the systemd credential expected by the bot
# the config file only has to be readable by root, systemd handles
# the rest of the permissions
# services.pg-13.configFile = "<path/to/your/config.toml>";
})
];
};
};
}