discord-interactions.py

create_modal

Function

Complete modal as a dict. Bare fields are wrapped in a Label automatically.

from discord_interactions import create_modal

Signature

def create_modal(    custom_id: str,    title: str,    *components: Any,    strict_text_inputs: bool = False,) -> Dict[str, Any]

Parameters

NameTypeDefaultDescription
custom_idstrrequiredIdentifier sent back on submit.
titlestrrequiredWindow title (45 characters max).
*componentsAny
strict_text_inputsboolFalseLegacy format: keep text inputs only.

Returns

Dict[str, Any]

Type a name: create_button, ModalBuilder, cooldown.