Discord verification for CMU https://verify.scottylabs.org
  • Rust 98.6%
  • Nix 1.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Anish Pallati 346a49b1fa
feat: migrate from devenv to kennel
Signed-off-by: Anish Pallati <i@anish.land>
2026-07-26 19:08:17 -04:00
.forgejo/workflows feat: migrate from devenv to kennel 2026-07-26 19:08:17 -04:00
src feat: standardize health endpoint on /api/health 2026-06-27 10:45:06 -04:00
.editorconfig feat: update to latest shared devenv module 2026-06-09 14:54:40 -07:00
.env.example feat: adopt shared ci and secretspec chains 2026-07-13 03:05:42 -04:00
.gitignore feat: move to secrets.scottylabs.org, remove direnv 2026-07-20 16:46:07 -04:00
Cargo.lock fix: bump serde_with to 3.21.0 2026-07-23 19:11:24 -04:00
Cargo.toml feat: migrate from devenv to kennel 2026-07-26 19:08:17 -04:00
devenv.lock feat: migrate from devenv to kennel 2026-07-26 19:08:17 -04:00
devenv.nix chore: bump devenv and disable preview deployments 2026-06-28 04:52:12 -04:00
devenv.yaml feat: migrate from devenv to kennel 2026-07-26 19:08:17 -04:00
flake.lock feat: migrate from devenv to kennel 2026-07-26 19:08:17 -04:00
flake.nix feat: migrate from devenv to kennel 2026-07-26 19:08:17 -04:00
LICENSE-APACHE-2.0 chore: sign licenses 2025-11-11 03:54:19 -05:00
LICENSE-MIT chore: sign licenses 2025-11-11 03:54:19 -05:00
osv-scanner.toml fix: pass security scan 2026-07-13 03:25:01 -04:00
README.md style: use header section 2026-07-17 10:50:35 +02:00
secretspec.toml feat: migrate from devenv to kennel 2026-07-26 19:08:17 -04:00

discord-verify

An Andrew ID Verification bot!

Development

# Set up environment variables
cp .env.example .env
# Edit .env with your personal Discord bot credentials

Create a new Discord bot or use one of your current ones, and put its token in .env. Everything else resolves from Vault when you enter the dev shell.

Data Model

# Guild Configuration
guild:{guild_id}:log_channel                  -> string (channel_id)
guild:{guild_id}:role:verified                -> string (role_id)
guild:{guild_id}:role:unverified              -> string (role_id)
guild:{guild_id}:role:level:Undergrad         -> string (role_id)
guild:{guild_id}:role:level:Graduate          -> string (role_id)
guild:{guild_id}:role:class:First-Year        -> string (role_id)
guild:{guild_id}:role:class:Sophomore         -> string (role_id)
guild:{guild_id}:role:class:Junior            -> string (role_id)
guild:{guild_id}:role:class:Senior            -> string (role_id)
guild:{guild_id}:role:class:Fifth-Year Senior -> string (role_id)
guild:{guild_id}:role:class:Masters           -> string (role_id)
guild:{guild_id}:role:class:Doctoral          -> string (role_id)

# Role assignment mode
guild:{guild_id}:role_mode                    -> string ("none" | "levels" | "classes" | "custom")
guild:{guild_id}:custom_levels                -> set (enabled level names)
guild:{guild_id}:custom_classes               -> set (enabled class names)

# User Verification Mappings
discord:{discord_id}:keycloak                 -> string (keycloak_id)
discord:{discord_id}:verified_at              -> string (unix_timestamp)
keycloak:{keycloak_id}:discord                -> string (discord_id)

# Temporary Verification State (TTL: 10 minutes)
verify:{state_token}                          -> json (PendingVerification)