Components

class quant.ButtonStyle(value)

Bases: Enum

Discord button styles

class quant.Button(custom_id: str | None = None, label: str | None = None, style: ButtonStyle = ButtonStyle.PRIMARY, emoji: Emoji | str | None = None, url: str | None = None, disabled: bool = False)

Bases: CallbackBackend[ButtonContext]

Represents a discord button

Parameters

custom_id: str | None

Button custom ID

style: ButtonStyle

Discord button style, default PRIMARY

label: str

Button label

emoji: Emoji | None

Button emoji

url: str | None

Button redirect url

disabled: bool

Set/check is button disabled

class quant.TextInputStyle(value)

Bases: Enum

Discord text input style

Attributes

SHORT:

Small text input

PARAGRAPH:

Big text input

class quant.TextInput(*, type: int = 4, custom_id: str, style: TextInputStyle = TextInputStyle.SHORT, label: str | None, min_length: int = 0, max_length: int = 4000, required: bool = True, value: str | None = None, placeholder: str | None = None)

Bases: object

Represents a discord text input

Parameters

custom_id: str

Text input custom ID

style: TextInputStyle

Text input style

label: str

Text input label

min_length: int

Minimal content length

max_length: int

Maximal content length

required: bool

Required field or no

value: str

Text input value

placeholder: str

Placeholder

class quant.Modal(*, title: str = 'Modal', custom_id: str, components: List[ActionRow] = [])

Bases: CallbackBackend[ModalContext]

Represents a discord modal window

Parameters

title: str

Modal window title

custom_id: str

Modal custom ID

components: List[ActionRow]

Modal components