How juddisjudd/oxbot works
Project type and purpose
• OxBot is an open-source Discord bot built in TypeScript using discord.js and Prisma.
• It listens for Discord events (messages, slash commands, member updates), runs command logic (fun, moderation, misc, “ox” commands), and persists data via a PostgreSQL database (accessed through Prisma).
File structure
• Top-level files and folders
• Dockerfile, docker-compose.yaml (dev & production) → containerization and deployment
• prisma/ → database schema and migrations
• src/ → application source
– commands/ (fun, misc, moderation, ox) → individual command modules
– events/ → event listeners for Discord events
– handlers/ → core logic for dispatching events and commands
– utils/, interfaces/, config.ts, constants.ts → shared utilities, type definitions, configuration
• Configuration files (.env template, package.json, tsconfig.json, nodemon.json) and CI workflow (.github/workflows/docker-push.yml) indicate a Docker-based, TypeScript-driven CI/CD pipeline.
README for additional insights
• Technologies: TypeScript, pnpm, Docker, Prisma, discord.js
• Purpose: Bot for Overextended Discord, no external support—focus on extensibility and clarity.
Elements
• Components labeled clearly (Discord Gateway, Bot Process, Handlers, Command Modules, Prisma Client, PostgreSQL, Docker Host, CI/CD)
• Bi-directional between Bot Process and Discord API (WebSocket & REST)
• Uni-directional from Command Modules to Prisma Client → PostgreSQL
• Deployment flow from CI/CD → Docker Registry → Docker Host
• Application layers (rectangles, blue)