Discord UI Modals

Compilation of Discord UI Modals

class Lookup[source]

A dictionary which iterates over values instead of keys.

class BaseModal[source]

A generic modal that can be used for getting user inputs.

add_short()[source]

Adds a short text input to the modal. :param text: The text to display. :type text: str

Parameters

text (str) –

add_long()[source]

Adds a long text input to the modal. :param text: The text to display. :type text: str

Parameters

text (str) –

property results: Lookup[str, str]

Returns the results of the modal. :return: The results of the modal. :rtype: Lookup

async on_submit()[source]

Called when the modal is submitted.

Parameters

interaction (Interaction) –

class ContentReplyModal[source]

A Modal which returns a content on submit.

async on_submit()[source]

Called when the modal is submitted.

Parameters

interaction (Interaction) –

class EmbedReplyModal[source]

A Modal which returns an embed on submit.

async on_submit()[source]

Called when the modal is submitted.

Parameters

interaction (Interaction) –

class FullReplyModal[source]

A Modal which replies the kwargs on submit.

async on_submit()[source]

Called when the modal is submitted.

Parameters

interaction (Interaction) –

class CallbackReplyModal[source]

A Modal which generates response from callback on submit.

add_callback()[source]

Adds a callback to the modal. :param callback: The callback to add. :type callback: Callable

Parameters

callback (Callable) –

async on_submit()[source]

Called when the modal is submitted.

Parameters

interaction (Interaction) –