# Creating a custom command

<i class="fa-crown">:crown:</i> **Premium feature.** On the dashboard, open **Custom Commands**, then **+ New Command** to open the creator.

The creator has two panes. The **left pane** is where you build the response (the message content, embeds, and buttons). The **right pane** holds the command's settings (name, trigger, options, and permissions).

<figure><img src="/files/YiVdGzhN5hv0Qixghq89" alt="The custom-command creator open showing both panes"><figcaption></figcaption></figure>

## Left pane, the response

The left pane is where you build what the command sends. There are three tabs.

### Text Content tab

A multi-line editor for the bot's reply.

* Limit: 2000 characters. A counter is shown, and it turns red as you near the limit.
* Supports Discord markdown.
* Has an inline emoji picker.
* When the command is **Ticket Only**, ticket placeholders work here (see the Placeholders section below).

Help text: *"Content is optional if at least one embed is provided."*

### Embeds tab

Up to 10 embeds. Open the **Embed Designer** to edit each one. It is the same designer used elsewhere in the dashboard.

* Per embed: title (256), description (4096), footer (2048), author (256), a color, an image, a thumbnail, and up to 25 fields (field name 256, field value 1024).
* Across all embeds in one command: up to 6000 characters total.

When **Ticket Only** is on, the embed text fields also support ticket placeholders.

A "Delete All" button removes every embed at once, with a confirmation step.

### Preview Response tab

A live preview of how the response will look in Discord, so you can check the formatting before you save.

### Link buttons

Inside the embeds you can add **link buttons**. These are link buttons only.

* Up to 5 rows of up to 5 buttons each.
* Each button needs a label (up to 80 characters) and a URL starting with http\:// or https\:// (up to 512 characters). A button can use just an emoji with no label.

These are useful for patterns like "Here is our refund policy" with a button that opens the page.

## Right pane, the settings

### Command Name

A text box that names the command in your dashboard. **Users do not see this.**

* Placeholder: `Wrong Ticket`
* Help text: *"Used only to identify this command in your dashboard. Users won't see it."*
* Required.
* Lowercased automatically.
* Must be unique in your server.

### Command Trigger

The text users type to fire the command.

* Placeholder: `!wrongticket`
* Help text: *"The text users will type to trigger this command."*
* Required.
* Lowercased automatically.
* Must be unique in your server.

You do not have to use a `!` prefix. Any text works. Pick one style and use it across your commands so your staff can remember them.

### Options

| Field                        | Type   | Default | Behavior                                                                                                               |
| ---------------------------- | ------ | ------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Command Enabled**          | toggle | On      | When off, typing the trigger does nothing.                                                                             |
| **Ticket Only**              | toggle | Off     | When on, the command fires only inside ticket channels, and ticket placeholders work in the response.                  |
| **Delete Command Message**   | toggle | Off     | When on, the bot deletes the user's trigger message after it responds.                                                 |
| **Reply to Command Message** | toggle | On      | When on, the bot's response is a reply to the user's message. This option is hidden when Delete Command Message is on. |

### Permissions

| Field                                         | Type          | Behavior                                                             |
| --------------------------------------------- | ------------- | -------------------------------------------------------------------- |
| **Allow All Staff**                           | toggle        | When on, anyone with a server-wide support role can use the command. |
| **Roles** (shown when Allow All Staff is off) | role selector | The specific roles allowed to use this command.                      |

## Validation

The Save button stays disabled until the command is valid. Common messages:

* *"Command name is required"*
* *"Command trigger is required"*
* *"Command must have content or at least one embed"*
* *"Command name already exists"*
* *"Command trigger already exists"*

## Placeholders (Ticket Only mode)

When **Ticket Only** is on, these placeholders are filled in when the command fires:

| Placeholder       | Filled in with                   |
| ----------------- | -------------------------------- |
| `{USER}`          | A mention of the ticket author   |
| `{TICKET_NUMBER}` | The ticket's number              |
| `{TYPE}`          | The panel option label           |
| `{USER_ID}`       | The ticket author's Discord ID   |
| `{USER_NAME}`     | The ticket author's display name |
| `{GUILD_NAME}`    | Your server name                 |
| `{CREATED_AT}`    | The ticket creation time         |

A placeholder with no value shows as `N/A`. Commands that are not Ticket Only do not support placeholders.

## Saving

Click **Save**. The command is active right away. The audit log records that the command was created.

## Related

{% content-ref url="/pages/iVFbqYWYBHtp3ivnAepW" %}
[Editing and deleting commands](/docs/custom-commands/editing-and-deleting.md)
{% endcontent-ref %}

{% content-ref url="/pages/CuVk7QZ2JZv7g18xkmkV" %}
[Use cases](/docs/custom-commands/use-cases.md)
{% endcontent-ref %}


---

# Agent Instructions: 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://ticketking.xyz/docs/custom-commands/creating-a-command.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.
