IntegerOption
Classe
Option entier (créée par Integer).
from discord_interactions.slash import IntegerOptionHérite de OptionBase
Constructeur
IntegerOption( name: str, description: str, required: bool = True, name_localizations: Dict[str, str] | None = None, description_localizations: Dict[str, str] | None = None, default: Any = None, validator: Callable[[Any], bool | str] | None = None, transformer: Callable[[Any], Any] | None = None, min_value: int | None = None, max_value: int | None = None, choices: List[Choice] | None = None, autocomplete: Callable[..., Awaitable[List[Tuple[str, Any]]]] | None = None, step: int | None = None,)| Nom | Type | Défaut | Description |
|---|---|---|---|
name | str | requis | |
description | str | requis | |
required | bool | True | |
name_localizations | Dict[str, str] | None | None | |
description_localizations | Dict[str, str] | None | None | |
default | Any | None | |
validator | Callable[[Any], bool | str] | None | None | |
transformer | Callable[[Any], Any] | None | None | |
min_value | int | None | None | |
max_value | int | None | None | |
choices | List[Choice] | None | None | |
autocomplete | Callable[..., Awaitable[List[Tuple[str, Any]]]] | None | None | |
step | int | None | None |
Propriétés
| Nom | Type | Description |
|---|---|---|
name | str | |
description | str | |
required | bool | |
name_localizations | Dict[str, str] | None | |
description_localizations | Dict[str, str] | None | |
default | Any | |
validator | Callable[[Any], bool | str] | None | |
transformer | Callable[[Any], Any] | None | |
min_value | int | None | |
max_value | int | None | |
choices | List[Choice] | None | |
autocomplete | Callable[..., Awaitable[List[Tuple[str, Any]]]] | None | |
step | int | None |
Méthodes
to_dict
def to_dict() -> Dict[str, Any]