Skip to content

Ticket form

A support system in three steps: a message with a button, a modal with the form and a ticket summary.

  1. The panel. A pinned message in the support channel:

    Preview
    My BotAPPToday at 12:00 PM

    🎫 Support

    Having a problem? Open a ticket and we will help you.

    payload.json
    {
    "flags": 32768,
    "components": [
    {
    "type": 17,
    "accent_color": 5793266,
    "components": [
    {
    "type": 9,
    "components": [
    {
    "type": 10,
    "content": "## 🎫 Support\nHaving a problem? Open a ticket and we will help you."
    }
    ],
    "accessory": {
    "type": 2,
    "style": 1,
    "label": "Open ticket",
    "custom_id": "open_ticket"
    }
    }
    ]
    }
    ]
    }
  2. The modal. When the button is clicked, the bot responds with this modal:

    Preview
    New ticket
    Category*
    Pick a category
    Describe the problem*
    Screenshots (optional)
    Drag files or click to upload
    modal.json
    {
    "type": 9,
    "data": {
    "custom_id": "ticket_modal",
    "title": "New ticket",
    "components": [
    {
    "type": 18,
    "label": "Category",
    "component": {
    "type": 3,
    "custom_id": "category",
    "placeholder": "Pick a category",
    "options": [
    {
    "label": "Technical issue",
    "value": "technical",
    "emoji": {
    "name": "🛠️"
    }
    },
    {
    "label": "Report a user",
    "value": "report",
    "emoji": {
    "name": "🚨"
    }
    },
    {
    "label": "Something else",
    "value": "other",
    "emoji": {
    "name": "💬"
    }
    }
    ]
    }
    },
    {
    "type": 18,
    "label": "Describe the problem",
    "component": {
    "type": 4,
    "custom_id": "description",
    "style": 2,
    "min_length": 20,
    "max_length": 1500
    }
    },
    {
    "type": 18,
    "label": "Screenshots (optional)",
    "component": {
    "type": 19,
    "custom_id": "screenshots",
    "required": false,
    "min_values": 0,
    "max_values": 3
    }
    }
    ]
    }
    }
  3. The summary. When the modal is submitted, the bot creates the ticket and replies with a summary:

    Preview
    My BotAPPToday at 12:00 PM

    Ticket #0042 · 🛠️ Technical issue

    Opened by @user 2026-11-02


    The bot hasn't answered the /profile command since yesterday.
    payload.json
    {
    "flags": 32768,
    "components": [
    {
    "type": 17,
    "accent_color": 16705372,
    "components": [
    {
    "type": 10,
    "content": "## Ticket #0042 · 🛠️ Technical issue"
    },
    {
    "type": 10,
    "content": "-# Opened by <@123456789012345678> <t:1793620800:R>"
    },
    {
    "type": 14
    },
    {
    "type": 10,
    "content": "> The bot hasn't answered the /profile command since yesterday."
    },
    {
    "type": 1,
    "components": [
    {
    "type": 2,
    "style": 3,
    "label": "Claim",
    "custom_id": "ticket_claim:42"
    },
    {
    "type": 2,
    "style": 4,
    "label": "Close",
    "custom_id": "ticket_close:42"
    }
    ]
    }
    ]
    }
    ]
    }
  1. When you receive custom_id: "open_ticket", respond with the modal JSON (type: 9).
  2. When you receive the MODAL_SUBMIT with custom_id: "ticket_modal", read the values and respond with type: 4 and the summary.