Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Capinetta-RP/capinetta-discord-bot/llms.txt

Use this file to discover all available pages before exploring further.

Capinetta RP Bot System is a modular, self-hosted Discord management platform built specifically for FiveM and GTA Roleplay communities. It runs two independent bots — Bot General and Bot Whitelist — as separate PM2 processes, meaning each bot can be updated, restarted, or scaled without touching the other. Bot General handles everything from anti-spam enforcement and moderation to professional ticket management, welcome cards, and full audit logging. Bot Whitelist provides dedicated application management so your staff can approve or reject roleplay whitelist requests with a single command and a polished embed notification. Both bots share a single MariaDB database through Prisma ORM, giving you one authoritative data store for guild settings, user warnings, ticket history, and role backups — all queryable through a web dashboard protected by Discord OAuth2.

Get Started

Quickstart

Install dependencies, initialize the database, deploy slash commands, and start both bots with PM2 in under 5 minutes.

Configuration

Full reference for every environment variable — tokens, database URL, OAuth2 credentials, Redis, HTTPS, alert thresholds, and cache TTLs.

Anti-Spam

Automatic role isolation, bulk message deletion, and 7-day account-age enforcement against coordinated raids.

Ticket System

Dynamic categories, claim/transfer/close flows, HTML transcripts, inactivity reminders, and KPI dashboards.

Web Dashboard

Express + EJS dashboard with Discord OAuth2 login, Redis caching, real-time KPIs, and background cleanup jobs.

Whitelist Management

Approve and reject roleplay applications with embed notifications sent directly to your results channel.

Key Features

Dual-Bot Architecture

Bot General and Bot Whitelist run as independent PM2 processes (capinetta-general / capinetta-whitelist), enabling zero-downtime restarts and isolated deployments.

Anti-Spam & Security

Detects repeated messages, saves user roles to MariaDB, and moves offenders to an isolation zone. Executes bulkDelete to purge spam instantly. Auto-kicks accounts younger than 7 days.

Intelligent Moderation

/warn registers infractions with reason and timestamp. Three warnings trigger an automatic 10-minute timeout. /unmute restores the full role list from the database. /kick writes to Audit Logs.

Professional Ticket System

Dynamic categories with per-role access, claim/transfer/close buttons, automatic HTML transcripts sent via DM, and two-stage inactivity reminders at 30 and 60 minutes.

Whitelist Management

/aprobar and /rechazar commands send styled embed notifications with applicant details to the configured results channel, streamlining staff review workflows.

Web Dashboard

Discord OAuth2 authentication, Redis-backed caching for user profiles and stats, real-time support KPIs, and background jobs for log cleanup (>30 days) and profile refresh.

Multi-Server Support

All settings, logs, and warnings are keyed by Guild ID in MariaDB, so a single deployment can serve multiple Discord communities with fully isolated configurations.

Full Audit Logging

Records message edits and deletions, role changes (consolidated with debounce to reduce noise), voice joins/leaves, bans, and member profile updates — all with timestamps and executor data.

Canvas Welcome Cards

Custom GTA-style welcome images generated with canvas on member join: circular avatar with neon glow, custom font, and server branding.

Tech Stack

The system is built on a modern, production-proven Node.js stack:
LayerTechnology
Bot frameworkDiscord.js v14 (^14.13.0)
Database ORMPrisma v5 (^5.10.0) with MariaDB/MySQL 8.0+
Web dashboardExpress.js v4 with EJS templates
AuthPassport.js + Discord OAuth2
CachingRedis via ioredis (falls back to in-memory)
Process managerPM2 (ecosystem.config.js)
Image generationCanvas v2 (^2.11.2)
Transcriptsdiscord-html-transcripts (^3.2.0)

Project Structure

capinetta-discord-bot/
├── commands/
│   ├── bot-general/        # Admin, moderation, utility slash commands
│   └── bot-whitelist/      # Aprobar / Rechazar commands
├── events/
│   ├── bot-general/        # messageCreate (anti-spam), guildMemberAdd (welcome), audits
│   └── bot-whitelist/      # ready, interactionCreate
├── handlers/               # Dynamic command and event loaders
├── utils/
│   ├── database.js         # Prisma connection
│   ├── dataHandler.js      # CRUD: guilds, users, warnings
│   └── tickets/            # Isolated ticket module (controllers, handlers, views, db)
├── web/
│   ├── dashboard.js        # Express server + OAuth2
│   └── views/              # EJS templates
├── prisma/
│   └── schema.prisma       # Database schema
├── index-general.js        # Bot General entry point
├── index-whitelist.js      # Bot Whitelist entry point
├── ecosystem.config.js     # PM2 process configuration
└── config.js               # Centralised runtime config
Capinetta RP Bot System is released under the MIT License (Copyright © 2026 Capi Netta RP). It was designed for the Capi Netta RP FiveM community, but is freely adaptable for any Discord server under the terms of the license — attribution to the original authors is appreciated. Source code is available at github.com/Capinetta-RP/capinetta-discord-bot.

Build docs developers (and LLMs) love