#How to make a button that will open a modal window
1 messages · Page 1 of 1 (latest)
-d disnake.MessageInteraction.responce.send_modal
Returns an object responsible for handling responding to the interaction.
A response can only be done once. If secondary messages need to be sent, consider using followup instead.
-d disnake.InteractionResponce.send_modal
await send_modal(modal=None, *, title=None, custom_id=None, components=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Responds to this interaction by displaying a modal.
New in version 2.4.
Note
Not passing the `modal` parameter here will not register a callback, and a [`on_modal_submit()`](https://docs.disnake.dev/en/latest/api.html#disnake.on_modal_submit "disnake.on_modal_submit") interaction will need to be handled manually.
interactions/modal.py
An example demonstrating two methods of sending modals and handling modal responses.
Use the buttons below to view on GitHub or in Discord.
@nova sable here you are