๐ซ TicketSystem
Description
File: TicketSystem.py
A comprehensive ticket management system supporting generic and technical support workflows. Features dynamic panels, multiple selector levels, HTML transcripts, and efficient database management.
Featuresโ
- Dynamic Panels: Create multiple interactive panels with dropdown selectors.
- Draft System: Users selections are saved as "drafts" until they confirm ticket creation.
- HTML Transcripts: Generates download-able HTML transcripts of closed tickets, including attachments.
- Auto-Tagging: Updates channel names and database entries with "Subject" based on selected options.
- Priority System: Assigns priorities (Low, Normal, High) based on templates.
- Role Management: Dynamically adds/removes staff roles based on ticket type (e.g., "Human Resources" sees HR tickets, but not Tech Support).
Commandsโ
Configurationโ
| Command | Description |
|---|---|
/ticket setup | Initialize system (Category, Logs, Staff Roles). |
/ticket install_default | Deploys a pre-built "Help Center" with 3 categories. |
/ticket debug cleanup | Database consistency check. |
Panels & Templatesโ
| Command | Description |
|---|---|
/ticket panel create | Create a new entry point (Embed with button). |
/ticket panel update | Update an existing panel. |
/ticket panel delete | Delete a panel. |
/ticket panel send | Post a panel to a channel. |
/ticket selector add | Add a dropdown menu to a panel. |
/ticket option add | Add choices to selectors. |
/ticket template new | Create a ticket preset (Welcome msg, Category). |
/ticket template link_selector | Trigger a template from a specific choice. |
Staff Actions (Inside Ticket)โ
| Command | Description |
|---|---|
/ticket claim | Assign the ticket to yourself. |
/ticket close | Close ticket & generate transcript. |
/ticket reopen | Re-open a closed ticket. |
/ticket add @user | Add a user to the ticket. |
/ticket remove @user | Remove a user. |
/ticket rename | Change channel name. |
/ticket move | Move channel to another category. |
Database Schemaโ
| Table | Description |
|---|---|
tickets | Stores active/archived tickets (status, opener_id, transcript_id). |
ticket_panels | Config for UI panels. |
ticket_selectors | Dropdown configurations. |
ticket_selector_options | Choices within dropdowns. |
ticket_templates | Presets for new tickets. |