Modal API Reference#

class flare.components.modal.Modal(*args, **kwargs)[source]#

Bases: SupportsCallback[ModalContext], SupportsCookie, MutableSequence[ModalComponent], Dataclass

insert(index: int, value: ModalComponent) None[source]#

S.insert(index, value) – insert value before index

async send(inter: ModalResponseMixin)[source]#

Respond to an iteration with this modal.

property cookie: str#

A unique identifier for a component.

class flare.components.modal.ModalComponent[source]#

Bases: Component[ModalActionRowBuilder]

class flare.components.modal.TextInput(label: str, style: ~hikari.components.TextInputStyle = <TextInputStyle.SHORT: 1>, min_length: int | None = None, max_length: int | None = None, required: bool | None = None, value: str | None = None, placeholder: str | None = None)[source]#

Bases: ModalComponent

build(action_row: ModalActionRowBuilder) None[source]#

Build and append a flare component to a hikari action row.

property custom_id: str#

A custom_id for a component.

property width: int#

The width of the component.