Documentation

CrystalTickets — Discord Ticket System

Discord ticket bot with panels, claiming, priorities, transcripts, reviews, invoices and an optional web dashboard.

This is a preserved product reference. Check the current listing for release-specific dependencies and support. Ask for help.

Reference information

Guide version: v1.0.0 Runtime: Node.js 20+ · discord.js 14 · MongoDB Guide updated: November 2026

Overview

CrystalTickets is a self-hosted Discord ticket bot with an optional web dashboard. Members open private ticket channels from panels; staff claim, prioritise and close them, and every ticket keeps its answers, history, review and transcript in MongoDB. • Panels with buttons or a select menu, and categories with up to 5 opening questions • Claiming with limits, auto-claim, reply rules and transfers • Priorities with emoji channel prefixes, role pings and role-based overrides • Close, archive, reopen and delete with HTML or TXT transcripts • Close DMs with the transcript and 1 to 5 star reviews • Inactivity reminders, customer keep-alive warnings and /alert • Working hours, ticket limits, cooldowns, a blacklist and overload notices • Predefined responses with /tag and staff statistics • Invoices with PayPal, Stripe or manually confirmed crypto • Web dashboard with password or Discord login • Every message, button and command configurable in YAML
RequirementSupported value
RuntimeNode.js 20 or newer
DatabaseMongoDB, for example a MongoDB Atlas cluster
DiscordA bot application with the Message Content intent enabled
HostingA VPS or Pterodactyl server; the dashboard needs one open port
Payments (optional)PayPal and Stripe need the dashboard reachable from the internet

Installation

1. Create an application in the Discord Developer Portal, add a bot, copy its token and enable the Message Content intent. 2. Invite the bot to your server. Missing bot permissions are reported in the console at startup. 3. Upload the CrystalTickets files, run npm install, then start it with npm start. 4. Fill in the required values in config.yml: Bot.Token, Bot.GuildID, MongoURI and a dashboard password of at least 10 characters. 5. Set Staff.Roles and a ParentCategoryID for each ticket category, and optionally Logging.ChannelID. 6. Restart and check the console for Configuration checked successfully with no errors. 7. In Discord, run /panel name:support in the channel where members should open tickets. Discord IDs must always be written in quotes. Configuration mistakes are reported in the console with the exact line to fix. The bot operates only in Bot.GuildID and leaves every other server. Never share config.yml: it contains your bot token and passwords.
Bot:
  Token: "your bot token"
  GuildID: "100000000000000001"
  Timezone: "Europe/London"

MongoURI: "mongodb+srv://user:password@cluster0.example.mongodb.net/?appName=CrystalTickets"

Dashboard:
  Port: 3000
  PublicURL: "http://203.0.113.10:3000"
  Users:
    - Username: "admin"
      Password: "choose-a-long-password"

Logging:
  ChannelID: "100000000000000004"

Staff:
  Roles: ["100000000000000002"]

Commands

Every command can be enabled, described and restricted in commands.yml. Disabled commands are not registered with Discord and are hidden from /help; changes sync on the next restart. Permission levels are Everyone, Staff (Staff.Roles, the category SupportRoles or admins) and Admin (Staff.AdminRoles or Discord Administrator). ExtraRoles lists additional role IDs that may always use a command. Ticket buttons use the same permission as their matching command.
Ticket:
  Close:
    Enabled: true
    Description: "Close a ticket"
    Permission: "Everyone"   # Everyone | Staff | Admin
    ExtraRoles: []
CommandDefault permissionPurpose
/helpEveryoneShow the available commands
/staffstats me · /staffstats user memberStaffWeekly, monthly and all-time staff statistics
/panel name [channel]AdminSend or update a ticket panel from config.yml
/close [reason]EveryoneClose a ticket (creators only when Tickets.UserCanClose is true)
/deleteStaffDelete a ticket after confirmation
/claim · /unclaimStaffClaim or release a ticket
/transfer memberStaffTransfer your claim to another staff member
/reopenStaffReopen a closed or archived ticket
/archive [reason]StaffArchive this ticket
/transcriptStaffGenerate a transcript
/rename nameStaffRename this ticket
/add member · /remove memberStaffAdd or remove a member
/alertStaffAsk the creator to respond before the ticket is closed
/priority levelStaffChange the priority
/move categoryStaffMove the ticket to another category
/pinStaffPin or unpin the ticket at the top of its category
/tag name [mention]StaffSend a predefined response
/invoice create · status · cancelAdminCreate and manage invoices
/blacklist add · remove · checkAdminManage the ticket blacklist

Panels & Categories

Panels are the messages members use to open tickets. Add as many as you like under Panels and publish them with /panel name:<panel> or from the dashboard; running /panel again updates the existing message. A panel shows its categories as buttons or as a select menu. Each category defines the Discord ParentCategoryID where channels are created, SupportRoles (empty uses Staff.Roles), RequiredRoles, a log channel, the channel name format, a default priority, the welcome embed and up to 5 questions in Short or Paragraph style.
Panels:
  support:
    Name: "Support"
    Type: "buttons"            # buttons | select
    Categories: ["general", "billing"]
    Embed:
      Title: "{server} Support"
      Description: "Choose a category below to open a private ticket."

Categories:
  general:
    Name: "General Support"
    Emoji: "💬"
    ParentCategoryID: "100000000000000003"
    SupportRoles: []
    ChannelNameFormat: "support-{ticket-id}"
    Priority: "Normal"
    Questions:
      - Label: "How can we help you?"
        Style: "Paragraph"
        Required: true
        MinLength: 10
        MaxLength: 1000

Ticket Lifecycle

Creating Before a ticket is created the bot checks the category, the blacklist, required roles, Tickets.MaxOpenPerUser (default 3), Tickets.CreationCooldown (default 1m) and, with WorkingHours.BlockOutside, working hours. A lock prevents duplicates from double clicks. The ticket gets the next number, a private channel and a welcome message with Close and Claim buttons that pings the support roles. Closing Use the Close button, /close, the dashboard or an automatic action. A transcript is generated, the action is logged and the creator receives a DM with the transcript and review buttons. With CloseAction: delete the channel becomes read-only and is deleted after DeleteDelay (default 10s); with archive it moves to the archive category. Reopening and deleting Closed and archived tickets can be reopened with their name, priority prefix and permissions restored. Deleting asks for confirmation and keeps the ticket record, answers, history, review and transcripts in MongoDB. Claiming The Claim button or /claim assigns a staff member. Options include MaxClaimsPerStaff, RequireClaimToReply, RestrictToClaimer, AutoClaim on the first staff reply and a ClaimedCategoryID for claimed tickets. Priorities The default levels are Low, Normal, High and Urgent, each with an emoji, a channel prefix and optional role pings. Priorities.RoleOverrides gives members with a role at least a given level. Discord allows 2 channel renames per 10 minutes; later renames are applied automatically. Inactivity and alerts Unanswered tickets remind staff after 2h. Customers who do not reply for 48h after a staff message get a warning with a Keep ticket open button and 24h to respond before the ticket is closed, archived or deleted. /alert sends the same kind of warning manually.

Invoices

Enable Invoices and at least one provider. PayPal and Stripe need the dashboard reachable at Dashboard.PublicURL for payment links, return pages and webhooks. /invoice create posts the invoice with Pay now and Check payment buttons. An invoice is marked paid only after the provider confirms it and the amount, currency and reference match. Crypto invoices show the wallet address and a QR code and are confirmed manually with Mark as paid in the dashboard. Test with PayPal sandbox and Stripe test mode before going live.
/invoice create customer:@Member amount:25 method:Stripe description:"Website setup" currency:EUR
/invoice status id:INV-00001
/invoice cancel id:INV-00001
StatusMeaning
pendingWaiting for payment
paidConfirmed by the provider or an admin
cancelledCancelled by staff
failedThe provider returned an error while creating the payment
expiredThe PayPal order was voided or the Stripe session expired

Web Dashboard

The dashboard lets admins manage settings, staff, panels, tickets, transcripts and invoices. Sign in with the accounts in Dashboard.Users (passwords are hashed with bcrypt on the next start and removed from the file) or with Discord OAuth2. Discord login allows AllowedUsers, admins and members with an AllowedRoles role, and access is re-checked every 5 minutes. For HTTPS, run the dashboard behind nginx, Caddy or Cloudflare, set PublicURL to the HTTPS address with TrustProxy: true and SecureCookies: true, then restart. For Discord login, add PublicURL followed by /auth/discord/callback as a redirect in the Developer Portal. On Pterodactyl keep Host 0.0.0.0 and use your allocated port.
Dashboard:
  Enabled: true
  Host: "0.0.0.0"
  Port: 3000
  PublicURL: "https://tickets.example.com"
  TrustProxy: true
  SecureCookies: true
  OAuth:
    Enabled: true
    ClientID: "500000000000000001"
    ClientSecret: "your-client-secret"
    RedirectURI: ""              # empty = PublicURL + /auth/discord/callback
    AllowedRoles: ["500000000000000002"]

Configuration

Durations use 30s, 15m, 2h, 1d or 1w (combine as 1h30m) and colours are hex values. Most settings apply on reload (dashboard save, Reload button or restart); the bot token, database and dashboard server settings need a restart.
PathDefaultPurpose
Tickets.MaxOpenPerUser3Open tickets per member (0 = unlimited)
Tickets.CreationCooldown1mWait between two tickets of one member
Tickets.CloseActiondeletedelete or archive
Tickets.DeleteDelay10sDelay before a closed ticket is deleted
Tickets.UserCanClosetrueCreators may close their own ticket
Transcripts.HTML · Transcripts.TXTtrue · falseTranscript formats
Transcripts.MaxMessages5000Messages per transcript
ClaimingSystem.MaxClaimsPerStaff0Open claims per staff member (0 = unlimited)
Inactivity.Unanswered.After2hStaff reminder for unanswered tickets
Inactivity.CustomerKeep.After48hCustomer inactivity warning
Alerts.WarningPeriod24hTime to respond after /alert
WorkingHours.EnabledfalseUse the weekly schedule in Bot.Timezone
TicketOverload.Threshold50Open tickets before the high-volume notice
Reviews.EnabledtrueStar buttons in the close DM
Bot.TimezoneUTCStatistics, working hours and transcript dates

Placeholders

Placeholders work in messages, embeds, channel names and topics.
Creator:   {user} {username} {user-id} {user-avatar}
Ticket:    {ticket} {ticket-id} {ticket-name} {category}
Staff:     {priority} {priority-emoji} {claimer} {staff} {target}
Server:    {server} {server-icon} {created-at} {close-reason} {delete-in}
Timing:    {time} {deadline} {inactive} {hours} {open-tickets} {max}
Invoices:  {invoice-id} {amount} {currency} {description} {status} {provider}
           {customer} {seller} {address} {crypto-name}
Reviews:   {stars} {rating} {comment}
Stats:     {claimed} {closed} {messages} {avg-response} {open-claimed} {reviews} {timezone}

Troubleshooting

The bot does not start. Bot.Token, Bot.GuildID and MongoURI are required, and the example values are refused. Read the console: configuration mistakes are reported with the exact line. The bot is missing permissions. Fix the permissions of the bot role in the server and in the ticket categories, then restart. The dashboard does not start. At least one valid password account (10 or more characters) or Discord login is required. The bot keeps running without the dashboard. The login loops or signs out immediately. SecureCookies is true but the page was opened over http, or TrustProxy is missing behind a reverse proxy. Discord login failed. The redirect in the Developer Portal must exactly match the URL printed in the console, including scheme, port and trailing slash. A rename did not apply. Discord allows 2 channel renames per 10 minutes; the bot applies the new name automatically later.

Support

For help, join the official Crystal Developments Discord: https://discord.gg/j6rHpCSKeJ. Include the CrystalTickets version, your Node.js version and host, the console output from startup and the related configuration with the bot token, MongoDB URI, passwords and payment keys removed.