Skip to content

Moderation tools for Discord communities

License

Notifications You must be signed in to change notification settings

reactiflux/mod-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4929ae1 · Apr 18, 2025
Dec 30, 2024
Jan 10, 2025
Apr 18, 2025
Nov 19, 2024
Apr 3, 2025
May 18, 2022
Dec 30, 2024
May 18, 2022
Sep 29, 2022
May 3, 2022
Apr 2, 2025
Dec 28, 2024
Dec 30, 2024
Jun 8, 2022
Sep 7, 2024
Sep 26, 2022
Dec 28, 2024
Nov 1, 2022
Jul 2, 2022
Sep 10, 2024
Dec 28, 2024
Jan 15, 2025
Apr 18, 2025
Nov 19, 2024
Dec 30, 2024
Jan 15, 2025
Apr 17, 2025
Dec 28, 2024
Dec 28, 2024
Dec 28, 2024
Aug 6, 2024
Dec 30, 2024
Dec 30, 2024
Dec 30, 2024

Repository files navigation

Mod bot

This code powers the Euno bot on Discord.

Initial setup

npm i
npm run dev

Tech

CI/CD

Implementation Details

migrations with npm run start:migrate. latest installed version is tracked in 2 tables of the sqlite data. schema changes must be done cautiously, should have a set up/tear down function tested before merging. Start a new migration with npx kysely migrate:make <name>

Migrations are stored in migrations/.

Generated DB types are stored in app/db.d.ts and generated automatically in a precommit hook and on app startup.

The code runs on a managed Kubernetes instance on Digital Ocean, using GitHub Actions as CI/CD. The service is configured using a kustomization.yaml file, which relies on configuration files within cluster/. Most of the configuration is in place to inject secrets stored in GitHub into the service upon deployment. Maybe most confusingly, there's a k8s-context file generated as part of CI that exists to pass along the latest Docker image tag from CI into the cluster configuration.

This bot was architected to support a web portal, but the k8s cluster configuration currently is not configured to be exposed to the internet, so it can not be used for a web portal in its current form.

The auth system is simple delegated auth to Discord. accounts are created if not found locally, no passwords or secondary confirmation atm. This system is not currently used for anything, it's a remnant of an earlier project that was abandoned.