Skip to content

Latest commit

 

History

1,459 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pawtropolis Tech Banner

Pawtropolis Tech

Bot Avatar

Discord bot for community gating and moderation

CI Schedulers Coverage Tests Commands Lines of Code

Version Node.js Discord.js TypeScript License


Staff? Read these first:


Overview

Pawtropolis Tech is a server-owned verification system that handles community onboarding through structured application flows. It replaces manual DM-based screening with a permission-gated workflow so staff stay accountable and applicants stay informed.

Every review action is logged, every decision is attributable, and the bot stays out of the way when it has no work to do.


Quick Start

# Clone and install
git clone https://github.com/watchthelight/pawtropolis-tech.git
cd pawtropolis-tech
npm install

# Configure environment
cp .env.example .env
# Edit .env with your DISCORD_TOKEN and CLIENT_ID

# Run all checks
npm run check

# Start development server
npm run dev

Key Scripts:

Command Description
npm run dev Development mode with hot reload
npm run build Build for production
npm run test Run test suite
npm run check Run all quality checks
npm run deploy:cmds Deploy slash commands to Discord

Features

Application Gating

  • Interactive modal forms with multi-page question flows
  • Configurable per-guild questions via SQLite schema
  • Draft recovery for incomplete applications
  • Submission validation with required field enforcement

Review & Decision Making

  • Reviewer dashboards with rich embeds and action buttons
  • Claim system to prevent review collisions
  • Full audit trail of approve/reject/kick decisions
  • Permanent rejection feature to block repeat applications

Modmail System

  • Private thread bridge for staff-applicant DM routing
  • Automatic transcript logging
  • Bidirectional message forwarding with reply threading

Avatar Risk Analysis

  • Google Cloud Vision SafeSearch integration
  • Configurable detection thresholds
  • One-click Google Lens reverse image search

Operations

  • Health monitoring with uptime checks, an off-process database integrity check every 6 hours, and event-loop lag tracking on the dashboard system page
  • Retention scheduler: hourly action-log search index catch-up, daily PRAGMA optimize, and flag-gated pruning of expired rows, deploy backups and 30-day-old verification posts (RETENTION_ENABLED=true)
  • Sentry integration for error tracking (profiling is opt-in)
  • Pino-based structured JSON logging (asynchronous, flushed on shutdown)
  • Documentation parity tests: the handbook, command reference, permission matrix, env examples and dashboard config editor are checked against the code by npm test

Configuration

Required Environment Variables

Variable Description
DISCORD_TOKEN Bot token from Discord Developer Portal
CLIENT_ID Application ID from Discord Developer Portal

Optional Environment Variables

Variable Description
GUILD_ID Guild ID for per-guild command registration
SENTRY_DSN Sentry error tracking DSN
LOG_LEVEL Pino log level (trace/debug/info/warn/error); production runs info
RESET_PASSWORD Password for admin reset commands
DB_HEALTHCHECK_MODE Boot-time integrity check: quick (production default), full or skip
RETENTION_ENABLED Lets the retention scheduler delete instead of logging a dry run
SENTRY_PROFILES_SAMPLE_RATE Opt-in CPU profiling (0 disables and skips loading the profiler)

Every variable the code reads, with its default, is in .env.example (bot) and web/.env.example (dashboard); tests/docs/env-example.test.ts fails when either file and the code disagree.


Initial Setup

# 1. Configure the gate system
/gate setup review_channel:#staff-review gate_channel:#gate general_channel:#general accepted_role:@Verified

# 2. Customize questions (optional)
/gate set-questions q1:"What is your age?" q2:"How did you find us?"

# 3. Preview welcome message
/gate welcome preview

Common Commands

Command Description
/gate setup Initialize guild configuration
/gate status View application statistics
/accept @user Approve application
/reject @user reason:"..." Reject with reason
/modstats View moderator statistics

For full command reference, see docs/BOT-HANDBOOK.md.


Documentation

Document Description
BOT-HANDBOOK.md Complete command reference
MOD-QUICKREF.md Quick reference for moderators
PERMS-MATRIX.md Permission requirements
CHANGELOG.md Version history
github-discord-badges GitHub-renderable Discord role/channel badges

Discord Badges in Docs

GitHub Markdown cannot render Discord mention syntax. Pawtropolis Tech generates SVG pill badges that look like Discord mentions, use real role names and colors, and are refreshed daily. Docs reference them as ![alt](https://cdn.jsdelivr.net/gh/watchthelight/pawtropolis-tech@main/docs/badges/svg/<id>.svg) instead of raw <@&id> strings. See docs/reference/github-discord-badges.md for the full system.


License

Licensed under the Attribution-No Wholesale Copying License (ANW-1.0).

You can use and modify the code for your own projects with proper attribution. You cannot redistribute the entire project as-is or rebrand it as your own work.

See LICENSE for full terms.


watchthelightadmin@watchthelight.org

About

Pawtropolis Discord Server Backbone

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages