How khpofdfdgf/guardbot works
GuardBot is a Discord server moderation bot with a companion staff dashboard. Members and staff interact through Discord commands and message events; moderation features apply rules and actions, while warning and case records support follow-up. A FastAPI web application adds OAuth login, dashboard/API routes, live connections, and an admin terminal. The README documents appeals, rules, automated moderation, and staff controls; some cog implementations were not excerpted, so their internal links are omitted. Edges cite excerpts, the source index, or README statements that support the relationship.
Main entry points: main.py Web App · config.py Runtime Config · bot.py Bot Runtime · automod.py Auto Moderation
Components 22
Discord Bot
- Bot Runtime
bot.py
Moderation Features
- Auto Moderation
cogs/automod.py - AI Checks
AI_Logic_moderation.py - Staff Commands
cogs/moderation.py - Appeals
cogs/appeals.py - Server Rules
cogs/rules.py - Event Logging
cogs/logging_events.py - Safe Mode
cogs/safemode.py - Config Commands
cogs/config_cmd.py
Web Dashboard
- Web App
web/main.py - OAuth Login
web/auth.py - Dashboard API
web/api.py - Dashboard Pages
web/templates - Live WebSocket
web/websockets.py - Admin Terminal
web/terminal.py
Configuration And State
- Runtime Config
config.py - Warnings And Cases
utils.py - Server Backups
backups
Other components
- Members
- Staff
- Discord
- ShellInABox
Connections 23
- Bot Runtime → Discord: connects to
README.md - Bot Runtime → Web App: starts alongside
bot.py - Web App → OAuth Login: includes router
web/main.py - Web App → Dashboard API: includes router
web/main.py - Web App → Live WebSocket: includes router
web/main.py - Web App → Admin Terminal: includes router
web/main.py - Web App → Dashboard Pages: renders
web/main.py - OAuth Login → Discord: requests profile
web/auth.py - OAuth Login → Web App: stores profile
web/auth.py - Admin Terminal → ShellInABox: controls process
web/terminal.py - Staff → Staff Commands: runs commands
README.md - Members → Appeals: submits appeal
README.md - Members → Server Rules: requests rules
README.md - Bot Runtime → Auto Moderation: loads cog
- Auto Moderation → AI Checks: checks messages
cogs/automod.py - Staff Commands → Warnings And Cases: records actions
cogs/moderation.py - Config Commands → Runtime Config: updates settings
cogs/config_cmd.py - Auto Moderation → Runtime Config: reads rules
cogs/automod.py - Staff Commands → Runtime Config: reads settings
cogs/moderation.py - Event Logging → Runtime Config: reads settings
cogs/logging_events.py - Server Rules → Runtime Config: reads settings
cogs/rules.py - Safe Mode → Runtime Config: reads settings
cogs/safemode.py - Safe Mode → Server Backups: restores snapshots
cogs/safemode.py