Bot developer
Modal Builder
Build interaction modal response JSON (type 9).
How to use
- Set modal title and custom_id, then add up to five text inputs.
- Each input needs a label and unique custom_id for your interaction handler.
- 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.