Option
Choice
#
Represents the option's choice.
Option
#
Represents the command option.
autocomplete
class-attribute
instance-attribute
#
Autocomplete callback.
When this argument is specified, the option becomes autocompletable.
channel_types
class-attribute
instance-attribute
#
channel_types: Sequence[ChannelType] = attrs.field(factory=tuple, repr=False, eq=False)
An optional channel types are available for selection.
Note
Available only for the channel option type.
choices
class-attribute
instance-attribute
#
A list of choices to the option.
description
class-attribute
instance-attribute
#
description: LocalizedOr[str] = attrs.field(default='No description', repr=False, eq=False)
The description of the option.
display_name
class-attribute
instance-attribute
#
display_name: LocalizedOr[str] | None = attrs.field(default=None, repr=False, eq=False)
Display name of option.
Note
Can be localized.
is_required
class-attribute
instance-attribute
#
is_required: bool = attrs.field(default=True, repr=True, eq=False)
An optional flag is the option is required.
Default: True
max_length
class-attribute
instance-attribute
#
max_length: int | None = attrs.field(default=None, repr=False, eq=False)
An optional maximum length of the option value.
Note
Available only for the string option type.
max_value
class-attribute
instance-attribute
#
max_value: int | None = attrs.field(default=None, repr=False, eq=False)
An optional maximum value of the option value.
Note
Available only for the integer/float option type.
min_length
class-attribute
instance-attribute
#
min_length: int | None = attrs.field(default=None, repr=False, eq=False)
An optional minimum length of the option value.
Note
Available only for the string option type.
min_value
class-attribute
instance-attribute
#
min_value: int | None = attrs.field(default=None, repr=False, eq=False)
An optional minimum value of the option value.
Note
Available only for the integer/float option type.