Discord Ticket Bot
A complete Discord support and triage suite built for gaming communities, studios, and high-volume Discord servers.
Overview & Context
Built to streamline support operations in active Discord servers, this bot provides an end-to-end ticketing workflow with staff accountability, automated routing, and detailed customer analytics.
It handles everything from automated department routing and canned responses to automated weekly productivity reports and self-hosted interactive transcripts via an embedded Express server.
Technical Architecture & Core Systems
Ticket Panels & Routing
Panels represent individual departments (Billing, Bug Reports, General Support) and support dual-mode ticket generation:
- •Dual Mode: Spawns tickets as either Legacy Text Channels inside specific Categories or Private Threads branching off a central Support Hub.
- •Role Routing: Pings or silently assigns specific Support Roles on ticket creation.
- •Manager Escalation: Automatically notifies designated manager roles on escalations or SLA response breaches.
- •Multi-Panels: Combines multiple department panels into a clean dropdown menu.
Ticket Lifecycle & Controls
Staff and users have access to an interactive button and select-menu UI:
- •Claim / Unclaim: Staff can claim a ticket. The embed updates to 'Claimed By: @User' with an 🔓 Unclaim button restricted to the claimant, managers, or admins.
- •Interactive HTML Transcripts: Prompts staff for a closure reason, generates an interactive HTML transcript, saves it to the database, sends it to the server log channel, and securely DMs the ticket creator.
- •Feedback & Ratings: Ticket creators receive an automated 5-star rating prompt DM upon closure to evaluate support quality.
- •Department Transfers: Migrates a ticket between panels (e.g. from Support to Billing) with automatic role permission resyncing.
- •Dynamic Voice Channels: 'Create VC' button spawns a private synchronized voice channel locked to ticket members.
- •Snooze State: Temporarily mutes or hides a ticket while waiting on user responses.
Automation & Inactivity Handlers
Background systems designed to prevent ticket buildup and keep staff response times fast:
- •Round-Robin Auto-Assign: Evenly distributes incoming tickets across online members of the Support Role.
- •Inactivity Auto-Close: Background Cron job warns inactive users at 50% timeout and silently auto-closes tickets if still unresponsive.
- •Deflection Intercept: Prompts users to describe their issue before opening a ticket to encourage self-resolution and harvest context.
- •Canned Snippets: Staff can create reusable responses (/snippet create) and deploy them instantly via /reply <snippet>.
Moderation & Database Integrity
Protections against spam, abuse, and accidental data corruption:
- •Anti-Spam Limits: Configurable maxOpenTickets per panel to prevent user ticket flooding.
- •Blacklisting: Permanently bans abusive users from opening tickets via /blacklist add.
- •Orphaned Channel Sync: Event listeners catch rogue manual channel deletions and reconcile database records cleanly to prevent corruption.
- •Cross-Ticket User Notes: Internal staff notes (/user notes add) that persist across all future tickets for that user.
Analytics & Web Dashboard
Built-in metrics and performance tracking for server managers:
- •Web Dashboard: Embedded Express server displaying real-time metrics (Open Tickets, Closed Tickets, Average 5-Star Rating) and hosting interactive HTML transcripts.
- •Weekly Productivity Reports: Automated Friday 17:00 UTC Cron job compiling a 7-day productivity report sent to admin channels.
- •Staff Performance: /staff stats allows querying individual staff metrics (Claimed vs Closed, Average Rating, and Average Resolution Time).
Command Reference
| Command | Description |
|---|---|
| /panel create | Build a new ticket department panel. |
| /panel update | Modify an existing panel's settings. |
| /panel view | Send the panel to a channel for user interaction. |
| /panel list | View all active configured panels. |
| /panel delete | Remove a panel and clean up routing. |
| /multipanel create | Combine panels into a single dropdown menu. |
| /config setup | Configure transcript channels, log channels, and deflection. |
| /report setup | Configure weekly Friday analytics reports. |
| /ticket add @user | Bring an external user into the current ticket. |
| /ticket remove @user | Remove a user from the current ticket. |
| /staff stats @user | Check a staff member's ticket-solving metrics. |
| /snippet create/list/delete | Manage reusable canned responses. |
| /reply <snippet> | Send a saved canned response into the ticket. |
| /blacklist add/remove | Manage the ticketing blacklist. |
| /user notes add/view | Manage internal staff notes attached to a user. |