Hi! This is an open source discord bot written in rust.
on-event | event-body | action taken | |
---|---|---|---|
reaction | 🔖 | dm message to reactor with copy of contents | |
message | @version | say package's version | |
message | @rev | say git hash built-from | |
message | @contribute | show list of things we want to have, documentation | |
All contributions are welcome. When contributing, please pull request to a new branch, or use the pull
.
Add your name to the contributors.txt. Please describe the changes made, and add the features to the list above.
- Nix
- pre-commit hooks
- Automatic update delivery
DISCORD_TOKEN=XXX nix run github:skarlett/coggie-bot#coggiebot
cachix use coggiebot
nix build github:skarlett/coggie-bot
# Show compilation options
nix flake show github:skarlett/coggie-bot
# cross compile
nix build github:skarlett/coggie-bot#packages.aarch64-linux
git clone https://github.com/skarlett/coggie-bot
cd coggie-bot
nix develop
cargo update
nix flake update
nix build
git commit -a -m "update dependencies"
git push origin your-update-branch
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
coggiebot.url = "github:skarlett/coggie-bot";
};
outputs = { self, nixpkgs, coggiebot }:
let
system = "x86_64-linux";
in {
nixosConfigurations.hostname = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
# ...
coggiebot.nixosModules.coggiebot
];
services.coggiebot.enable = true;
services.coggiebot.environmentFile = "/etc/coggiebot/env_vars";
};
};
}
the objective of using a custom package manager is to achieve the goal of self-updating.
# jump to root
sudo su
# install nix-multiuser-mode
sh <(curl -L https://nixos.org/nix/install) --daemon
# activate PATH
# This is automatically appended into ~/.bashrc
# activate in current session
. ~/.nix-profile/etc/profile.d/nix.sh
# Add flakes to nix
echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
adduser coggiebot
mkdir -p /var/coggiebot
chown coggiebot /var/coggiebot
su coggiebot
cd /var/coggiebot
nix build github:skarlett/coggie-bot
/var/coggie/result/enable
/var/coggie/result/start