discord-interactions.py

Choice

Class

Fixed choice of an option.

from discord_interactions import Choice

Constructor

Choice(name: str, value: Any, name_localizations: Dict[str, str] | None = None)
NameTypeDefaultDescription
namestrrequired
valueAnyrequired
name_localizationsDict[str, str] | NoneNone

Properties

NameTypeDescription
namestr
valueAny
name_localizationsDict[str, str] | None

Methods

to_dict

def to_dict() -> Dict[str, Any]

Type a name: create_button, ModalBuilder, cooldown.