# Copy of EzPanel

### **Overview**

EzPanel Ticket Bot is a powerful and highly customizable system for managing support tickets, inquiries, and service requests within your Discord server. It allows server administrators to create interactive panels with multiple "variants" (ticket types), each potentially having unique pricing, modal questions, required roles, and target categories. The bot handles ticket creation, automated management, permission control, and detailed logging with transcripts. This guide will walk you through all available commands and features.

***

## 1. Panel & Variant Management Commands

These commands are for administrators to create, edit, and manage the ticket panels and the options (variants) within them.

#### 1.1. Panel Commands

**`/create_panel <category> [title] [description] [color] [image_url] [thumbnail_url] <variant_name> [variant_ticket_description] [price] [emoji] [variant_category_id] [required_role] [display_mode] [button_color] [modal_q1] [modal_q2] [modal_q3] [modal_q4] [modal_q5]`**

Create a new ticket panel with its first variant.\
This command initializes a new interactive panel message in the current channel. Users will interact with this panel to open tickets.

* `category`: The default Discord category where tickets from this panel will be created.
* `title` *(Optional)*: The main title for the panel embed.
* `description` *(Optional)*: The main description for the panel embed. Supports basic Discord markdown and `\n` for new lines.
* `color` *(Optional)*: Hex color code (ex: `FF0000`) or predefined color name (ex: `Red`) for the panel embed.
* `image_url` *(Optional)*: URL for large image of the panel embed.
* `thumbnail_url` *(Optional)*: URL for thumbnail image of the panel embed.
* `variant_name`: The name for the first variant/option on this panel.
* `variant_ticket_description` *(Optional)*: Custom description for the embed inside the ticket channel when this variant is chosen. Supports placeholders like `{user.mention}`, `{variant.name}`.
* `price` *(Optional)*: A numerical price for this first variant.
* `emoji` *(Optional)*: An emoji (Unicode or custom Discord emoji ID) to display next to this first variant.
* `variant_category_id` *(Optional)*: A specific Discord category ID where tickets for THIS variant will be created, overriding the panel's default category.
* `required_role` *(Optional)*: A specific role a user must have to open a ticket using this variant.
* `display_mode` *(Optional)*: How variants are displayed: `dropdown` (default) or `buttons`.
* `button_color` *(Optional)*: If `display_mode` is `buttons`, specifies the color: `grey`, `green`, `red`, `blue`.
* `modal_q1` to `modal_q5` *(Optional)*: Up to 5 questions (max 45 chars each) to ask the user in a modal when they select this variant.

  * **Example:** `/create_panel "Support Tickets" title:"Support" description:"Open a ticket for technical help." variant_name:"General Issue" display_mode:buttons button_color:blue modal_q1:"What is your problem?"`

**`/edit_panel <message_id> [category] [title] [description] [color] [image_url] [thumbnail_url] [display_mode]`**

Edit an existing ticket panel's properties.\
This command modifies the appearance and general settings of an existing panel message.

* `message_id`: The Discord Message ID of the panel you want to edit.
* `category` *(Optional)*: New default Discord category for tickets from this panel.
* `title` *(Optional)*: New title for the panel embed.
* `description` *(Optional)*: New description for the panel embed.
* `color` *(Optional)*: New hex color code for the panel embed.
* `image_url` *(Optional)*: New URL for the panel embed's large image.
* `thumbnail_url` *(Optional)*: New URL for the panel embed's thumbnail.
* `display_mode` *(Optional)*: Change the display mode for variants (`dropdown` or `buttons`).
  * **Example:** `/edit_panel 123456789012345678 title:"Customer Support" color:Green`

**`/del_panel <message_id>`**

Delete an existing ticket panel and all its associated variants.\
This command removes the panel message from Discord and deletes the panel and its variants from the database. Existing tickets created from this panel are unaffected.

* `message_id`: The Discord Message ID of the panel to delete.  **Example:** `/del_panel 123456789012345678`

#### 1.2. Variant Commands

**`/add_variant <message_id> <variant_name> [ticket_description] [price] [emoji] [variant_category_id] [required_role] [button_color] [modal_q1] [modal_q2] [modal_q3] [modal_q4] [modal_q5]`**

Add a new variant (option) to an existing ticket panel.

* `message_id`: The Discord Message ID of the panel to add this variant to.

* `variant_name`: The name for the new variant/option.

* `ticket_description` *(Optional)*: Custom description for the embed inside the ticket channel for this variant. Use placeholders like `{user.mention}`.

* `price` *(Optional)*: A numerical price for this variant.

* `emoji` *(Optional)*: An emoji for this variant.

* `variant_category_id` *(Optional)*: Specific Discord category ID for tickets from THIS variant.

* `required_role` *(Optional)*: Role a user must have for this variant.

* `button_color` *(Optional)*: If panel `display_mode` is `buttons`, specifies color: `grey` (default), `green`, `red`, `blue`.

* `modal_q1` to `modal_q5` *(Optional)*: Up to 5 modal questions for this variant.
  * **Example:** `/add_variant 123456789012345678 variant_name:"Bug Report" emoji:"🐞" modal_q1:"Steps to reproduce?"`

#### `/edit_variant <message_id> <variant_option> [name] [ticket_description] [price] [emoji] [variant_category_id] [required_role] [button_color] [status] [modal_q1] [modal_q2] [modal_q3] [modal_q4] [modal_q5]`

Edit an existing variant within a ticket panel.

* `message_id`: The Discord Message ID of the panel containing the variant.

* `variant_option`: Select the variant to edit from the autocomplete list (this will be the variant's ID).

* `name` *(Optional)*: New name for the variant.

* `ticket_description` *(Optional)*: New custom ticket embed description. Use `"CLEAR"` to remove an existing custom description and revert to default.

* `price` *(Optional)*: New price for the variant.

* `emoji` *(Optional)*: New emoji for the variant.

* `variant_category_id` *(Optional)*: New specific category ID for the variant.

* `required_role` *(Optional)*: New role required for this variant. To clear, select an invalid/non-existent role when prompted by Discord (or use server settings if the bot doesn't clear it).

* `button_color` *(Optional)*: New button color (if panel uses buttons mode).

* `status` *(Optional)*: Set the variant's visibility and interaction state:
  * `enabled`: Visible and clickable.
  * `disabled`: Visible but not clickable (only applies if panel `display_mode` is `buttons`).
  * `hidden`: Not visible on the panel.

* `modal_q1` to `modal_q5` *(Optional)*: Set or change modal questions. Providing any `modal_q#` will overwrite all existing modal questions for this variant with the new set.
  * **Example:** `/edit_variant message_id:123456789012345678 variant_option:"Bug Report" price:0 status:enabled`

**`/del_variant <message_id> <variant_option>`**

Delete a specific variant from a ticket panel.\
The last *visible* variant cannot be deleted (hide it first or delete the panel).

* `message_id`: The Discord Message ID of the panel containing the variant.
* `variant_option`: Select the variant to delete from the autocomplete list (this will be the variant's ID).
  * **Example:** `/del_variant message_id:123456789012345678 variant_option:"Old Service"`

***

## 2. Ticket Management Commands

These commands are used to manage active tickets. Some may require specific permissions.

**`/close`**

Close the current ticket channel.\
If enabled, this will prompt for confirmation. It saves a transcript, sends logs, and deletes the channel.

**`/close_all`**

Closes all currently open tickets on the server.\
This is an admin-only command and will ask for confirmation due to its wide impact.

**`/rename <new_name>`**

Rename the current ticket channel.

* `new_name`: The desired new name for the ticket channel. Special characters will be sanitized.  `e`

**`/move <category>`**

Moves the current ticket channel to a different Discord category.

* `category`: The target Discord category to move the channel to.  **Example:** `/move "Resolved Tickets"`

**`/add_user <user>`**

Add a specified user to the current ticket channel.\
The added user will typically receive permissions similar to the ticket opener.

* `user`: The @mention or ID of the user to add.

**`/remove_user <user>`**

Remove a specified user from the current ticket channel.\
This removes any specific permission overwrites for that user in the ticket. They may still have access via roles.

* `user`: The @mention or ID of the user to remove.

**`/alert [hours]`**

Set an auto-close alert for the current ticket.\
If no response is received from the ticket opener within the specified time, the ticket will be closed automatically.

* `hours` *(Optional)*: Number of hours until auto-close. Defaults to a pre-configured value (ex: 12 hours).  **Example:** `/alert hours:24`

***

## 3. Configuration Commands

These commands allow administrators to customize the bot's behavior and permissions.

**`/setup general [max_tickets] [timezone] [ticket_closure_confirmation] [claim_system] [footer_name] [footer_image_url] [embed_color] [logs_channel] [ticket_opening_ping] [ticket_name_format] [dm_transcript]`**

Configure general bot settings. All parameters are optional.

* `max_tickets` *(Optional)*: Maximum number of open tickets a single user can have (ex: `2`, min: `1`).
* `timezone` *(Optional)*: Bot's timezone for timestamps (ex: `Europe/Paris`, `UTC`).
* `ticket_closure_confirmation` *(Optional)*: Enable (`enable`) or disable (`disable`) the confirmation step before closing a ticket.
* `claim_system` *(Optional)*: Enable (`enable`) or disable (`disable`) the ticket claim system.
* `footer_name` *(Optional)*: Custom text for embed footers. Leave empty or use `"CLEAR"` to revert to default.
* `footer_image_url` *(Optional)*: Custom image URL for embed footers. Leave empty or use `"CLEAR"` to revert to default.
* `embed_color` *(Optional)*: Default color for bot embeds (hex code or predefined name).
* `logs_channel` *(Optional)*: The Discord text channel where ticket transcripts and logs will be sent.
* `ticket_opening_ping` *(Optional)*: Enable (`enable`) or disable (`disable`) automatic pings to designated roles when a new ticket is opened.
* `ticket_name_format` *(Optional)*: Format for newly created ticket channel names (ex: `variant-number-pseudo`).
* `dm_transcript` *(Optional)*: Enable (`enable`) or disable (`disable`) DMing the transcript to the ticket opener upon closure

  * **Example:** `/setup general max_tickets:3 timezone:UTC logs_channel:#ticket-logs`
  * feazihfae

**`/setup command_permissions <role>`**

Configure which bot commands a specific role can use.\
Presents an interactive UI to select allowed commands for the chosen role.

* `role`: The @mention or ID of the role to configure.  **Example:** `/setup command_permissions @Moderator`

**`/setup ticket_permissions <is_ticket_opener> [role]`**

Set in-ticket channel permissions for a role or for the ticket opener.\
Presents an interactive UI to select specific Discord permissions (ex: send messages, attach files) that apply *inside* ticket channels.

* `is_ticket_opener`: Choose "Yes" to configure for the ticket opener, or "No" to configure for a role.
* `role` *(Optional)*: If `is_ticket_opener` is "No", specify the @mention or ID of the role.  **Example:** `/setup ticket_permissions is_ticket_opener:No role:@SupportStaff`

**`/sync_ticket_perms`**

Resynchronize and apply all currently configured in-ticket permissions to all active (open) ticket channels.\
Useful after making changes with `/setup ticket_permissions` to update existing tickets.**Example:** `/sync_ticket_perms`

***

## 4. Information & Utility Commands

**`/tickets_stats`**

Display current ticket statistics for the server.\
Includes total tickets, active tickets, total messages, average response time, and active tickets per category.

**`/perms` (Display Bot Command Permissions)**

Display all TicketBot command permissions currently set up for roles.\
Shows which roles are allowed to use which bot slash commands.

**`/ticket_perms` (Display Ticket Channel Permissions)**

Display all configured in-ticket channel permissions for roles and the ticket opener.\
Shows what permissions different roles (or the ticket opener) have *inside* a ticket channel.

**`/help`**

Display a list of all available TicketBot commands and their descriptions.

**`/ping`**

Check the bot's current latency to Discord and provides a performance score.

***

## 5. Automated Ticket System Features

#### 5.1. Panel Interaction & Ticket Creation

* Users click buttons or select options from a dropdown on a panel to initiate ticket creation.
* Variants can require specific roles; users without the role cannot select that variant.
* If a variant has modal questions configured, a pop-up form will appear for the user to fill out.
* A new, private ticket channel is created in the designated category.
* **Channel Name:** Ticket channels are named according to the format set in `/setup general`.
* **Initial Embed:** An embed message is posted in the new ticket, with a custom description if set for the variant.
* **Pings:** If enabled (`/setup general ticket_opening_ping:enable`), relevant roles (configured via `/setup ticket_permissions`) are pinged in the new ticket. This ping is quickly deleted.
* **Ticket Limit:** Users are restricted by the maximum number of open tickets configured via `/setup general`.

#### 5.2. Ticket Closure

* **Confirmation:** If enabled (`/setup general ticket_closure_confirmation:enable`), users are asked to confirm before a ticket is closed.
* **Transcripts:** Upon closing, a detailed HTML transcript of the conversation is generated.
* **Logging:** An embed summarizing the ticket closure (closer, creator, stats) along with the HTML transcript is sent to the configured logs channel (`/setup general logs_channel`).
* **DM Transcript:** If enabled (`/setup general dm_transcript:enable`), the HTML transcript is also DMed to the ticket opener.
* **Channel Deletion:** The ticket channel is deleted after closure.

#### 5.3. Auto-Close Alerts (`/alert`)

* When an alert is set, the ticket opener is notified that the ticket will close due to inactivity.
* If the ticket opener (or anyone with permission to speak in the ticket) sends any message in the ticket channel, the auto-close alert is automatically cancelled.
* If no response is received by the expiry time, the ticket is automatically closed by the bot, generating a transcript and logs as usual.

#### 5.4. Claim System

* If enabled (`/setup general claim_system:enable`), a "Claim" button appears in new tickets.
* Staff members (excluding the ticket opener) can click this button to officially take ownership of the ticket.
* Once claimed, the button updates to show who claimed it and becomes disabled.
* This helps in coordinating support efforts.

#### 5.5. Permissions System

* **Bot Command Permissions:** Administrators can define precisely which roles can use specific EzPanel Bot commands (ex: only `@Admin` can use `/del_panel`). Configured via `/setup command_permissions`.
* **In-Ticket Permissions:** Administrators can control what different roles (or the ticket opener themselves) can do *inside* a ticket channel (ex: send messages, attach files, close tickets). Configured via `/setup ticket_permissions`. This is separate from bot command permissions.

#### 5.6. Persistence & UI Restoration

* Panel messages (with their dropdowns/buttons) and active ticket action buttons (Close/Claim) are restored if the bot restarts, ensuring continuous operation.
* Panel views automatically update if variants are added, edited (ex: status changed), or removed.

***

## 6. Customization Highlights

EzPanel Ticket Bot offers extensive customization:

* **Panel Appearance:** Titles, descriptions, colors, images, thumbnails.
* **Variant Details:** Names, prices, emojis, specific categories, required roles, button colors, modal questions.
* **Ticket Embeds:** Custom descriptions within tickets per variant.
* **Bot Settings:** Max tickets, timezone, embed footers, global embed color, logs channel.
* **Naming & Pings:** Ticket channel name format, enable/disable opening pings.
* **Workflow:** Enable/disable ticket closure confirmation, DM transcripts, claim system.

***

## 7. Advantages of EzPanel Ticket Bot

* **Efficiency:** Streamlined ticket creation and management through interactive panels.
* **Automation:** Automated pings, alerts, auto-closure, transcript generation, and logging reduce manual workload.
* **Customization:** Tailor panels, variants, and bot behavior to fit specific server needs.
* **Granular Permissions:** Fine-grained control over who can use bot commands and what users/roles can do within tickets.
* **User-Friendly:** Intuitive commands and UI components for both users and administrators.
* **Persistence:** Ensures panels and critical UI elements remain active even after bot restarts.

***

## 8. Frequently Asked Questions (FAQ)

**Q: How do I create a ticket panel?**\
A: Use the `/create_panel` command, specifying at least a category and a name for the first variant. Many other options are available for customization.

**Q: How do users open a ticket?**\
A: Users interact with the panel message created by `/create_panel`. They will either click a button or select an option from a dropdown corresponding to the "variant" (ticket type) they need. If modal questions are set for that variant, a form will pop up.

**Q: What happens if a ticket is auto-closed by an alert?**\
A: The ticket channel will be closed, a transcript generated, and logs sent, similar to a manual closure. The "closed by" field will indicate it was an automated closure.

**Q: Can I change the look of the bot's messages?**\
A: Yes, you can set a default embed color, custom footer text, and footer icon URL using the `/setup general` command. Panel embeds can also have unique colors and images.

**Q: How do I control which staff members can manage panels or use specific bot commands?**\
A: Use the `/setup command_permissions` command to assign specific bot command permissions to roles. For example, you can allow only `@SeniorStaff` to use `/del_panel`.

**Q: How do I control what staff members (or the ticket opener) can do&#x20;*****inside*****&#x20;a ticket?**\
A: Use the `/setup ticket_permissions` command. This lets you define permissions like "can send messages," "can attach files," or "can close ticket" for different roles or for the ticket opener within the ticket channel itself.

**Q: What if I change permissions? Do I need to update old tickets?**\
A: Yes, after changing in-ticket permissions with `/setup ticket_permissions`, run `/sync_ticket_perms` to apply the new permission settings to all currently open ticket channels.

***

## 9. Conclusion

EzPanel Ticket Bot provides a robust, highly adaptable, and automated system for managing tickets on your Discord server. With its wide array of commands for panel customization, ticket handling, and granular permission controls, it aims to create an organized and efficient support environment for both your users and your administrative team. For further support or questions, feel free to contact us on [discord.gg/anewvision](https://discord.gg/anewvision).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://av0.gitbook.io/av/bots/copy-of-ezpanel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
