Skip to main content

๐ŸŽซ 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โ€‹

CommandDescription
/ticket setupInitialize system (Category, Logs, Staff Roles).
/ticket install_defaultDeploys a pre-built "Help Center" with 3 categories.
/ticket debug cleanupDatabase consistency check.

Panels & Templatesโ€‹

CommandDescription
/ticket panel createCreate a new entry point (Embed with button).
/ticket panel updateUpdate an existing panel.
/ticket panel deleteDelete a panel.
/ticket panel sendPost a panel to a channel.
/ticket selector addAdd a dropdown menu to a panel.
/ticket option addAdd choices to selectors.
/ticket template newCreate a ticket preset (Welcome msg, Category).
/ticket template link_selectorTrigger a template from a specific choice.

Staff Actions (Inside Ticket)โ€‹

CommandDescription
/ticket claimAssign the ticket to yourself.
/ticket closeClose ticket & generate transcript.
/ticket reopenRe-open a closed ticket.
/ticket add @userAdd a user to the ticket.
/ticket remove @userRemove a user.
/ticket renameChange channel name.
/ticket moveMove channel to another category.

Database Schemaโ€‹

TableDescription
ticketsStores active/archived tickets (status, opener_id, transcript_id).
ticket_panelsConfig for UI panels.
ticket_selectorsDropdown configurations.
ticket_selector_optionsChoices within dropdowns.
ticket_templatesPresets for new tickets.