Blancoda goat

Bot developer

Modal Builder

Build interaction modal response JSON (type 9).

Modal builder

Builds an interaction response payload (type 9). Modals are sent from your bot when handling an interaction. This tool does not send anything.

Interaction response JSON
{ "type": 9, "data": { "custom_id": "modal_submit", "title": "My modal", "components": [] } }

How to use

  1. Set modal title and custom_id, then add up to five text inputs.
  2. Each input needs a label and unique custom_id for your interaction handler.
  3. Copy the type 9 interaction response JSON. Return it from your bot when opening the modal.

Frequently asked questions

Can I open a modal from this page?
No. Modals are returned as interaction responses from your bot when a user clicks a button or command.
How many inputs fit in one modal?
Up to five top-level components. Each text input needs a unique custom_id under 100 characters.
Where does the JSON go?
Return it as type 9 from your interaction handler. Copy the payload into discord.js, discord.py, or your framework.