Skip to content

Options#

ColourOption module-attribute #

ColourOption = ColorOption

An alias for ColorOption.

ColourParams module-attribute #

ColourParams = ColorParams

An alias for ColorParams.

AttachmentOption #

Bases: CommandOptionBase[Attachment, ClientT, AttachmentParams]

A slash command option that represents an attachment.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[hikari.Attachment, AttachmentParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

AttachmentParams #

AttachmentParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None
)

Bases: OptionParams[Attachment]

The parameters for an attachment option.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The name of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description_localizations

The description of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

BoolOption #

Bases: CommandOptionBase[bool, ClientT, BoolParams]

A slash command option that represents a bool.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[bool, BoolParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

BoolParams #

BoolParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None
)

Bases: OptionParams[bool]

The parameters for a bool option.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The localizations for the name of the option

TYPE: Optional[Mapping[str, str]] DEFAULT: None

description_localizations

The localizations for the description of the option

TYPE: Optional[Mapping[str, str]] DEFAULT: None

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

ChannelOption #

Bases: CommandOptionBase[PartialChannel, ClientT, ChannelParams]

A slash command option that represents a channel.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[hikari.TextableGuildChannel, ChannelParams(...)]

Note: The type of the channel determines the channel types that this option can be used with.

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

channel_types class-attribute instance-attribute #

channel_types: Sequence[ChannelType] | None = None

The channel types that the option can be.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

ChannelParams #

ChannelParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None
)

Bases: OptionParams[PartialChannel]

The parameters for a channel option. The channel types are inferred from the type hint.

Example

An option of type hikari.TextableGuildChannel will resolve to hikari.ChannelType.GUILD_PUBLIC_THREAD | hikari.ChannelType.GUILD_PRIVATE_THREAD | hikari.ChannelType.GUILD_NEWS_THREAD.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The name of the option in different locales

TYPE: Mapping[Locale, str] DEFAULT: None

description_localizations

The description of the option in different locales

TYPE: Mapping[Locale, str] DEFAULT: None

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

ColorOption #

Bases: ConverterOption[Color, ClientT, ColorParams, str]

A slash command option that represents a color.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[hikari.Color, ColorParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

ColorParams #

ColorParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None
)

Bases: OptionParams[Color]

The parameters for a color option.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The name of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description_localizations

The description of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

EmojiOption #

Bases: ConverterOption[Emoji, ClientT, EmojiParams, str]

A slash command option that represents an emoji.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[hikari.Emoji, EmojiParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

EmojiParams #

EmojiParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None
)

Bases: OptionParams[Color]

The parameters for an emoji option.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The name of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description_localizations

The description of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

FloatOption #

Bases: OptionWithChoices[float, ClientT, FloatParams[ClientT]]

A slash command option that represents a float.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[float, FloatParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

autocomplete_with class-attribute instance-attribute #

autocomplete_with: AutocompleteCallbackT[ClientT, ChoiceT] | None = None

The callback for autocompleting the option.

choices class-attribute instance-attribute #

choices: Sequence[ChoiceT | CommandChoice] | Mapping[str, ChoiceT] | None = None

The choices for the option.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

max class-attribute instance-attribute #

max: float | None = None

The maximum value of the option.

min class-attribute instance-attribute #

min: float | None = None

The minimum value of the option.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

FloatParams #

FloatParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] = {},
    description_localizations: Mapping[Locale, str] = {},
    min: float | None = None,
    max: float | None = None,
    choices: (
        Sequence[float | CommandChoice] | Mapping[str, float] | None
    ) = None,
    autocomplete_with: AutocompleteCallbackT[ClientT, float] | None = None
)

Bases: OptionWithChoicesParams[float, ClientT]

The parameters for a float option.

Warning

You cannot provide both choices and autocomplete_with at the same time.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The name of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: {}

description_localizations

The description of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: {}

min

The minimum value of the option

TYPE: float | None DEFAULT: None

max

The maximum value of the option

TYPE: float | None DEFAULT: None

choices

The choices for the option. If provided, these will be the only valid values for the option.

TYPE: Sequence[float | CommandChoice] | Mapping[str, float] | None DEFAULT: None

autocomplete_with

The callback that is invoked when the user autocompletes the option

TYPE: AutocompleteCallbackT[ClientT, int] | None DEFAULT: None

autocomplete_with property #

autocomplete_with: AutocompleteCallbackT[ClientT, ChoiceT] | None

The callback for autocompleting the option.

choices property #

choices: Sequence[ChoiceT | CommandChoice] | Mapping[str, ChoiceT] | None

The choices for the option. If provided, these will be the only valid values for the option.

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

max property #

max: float | None

The maximum value of the option.

min property #

min: float | None

The minimum value of the option.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

IntOption #

Bases: OptionWithChoices[int, ClientT, IntParams[ClientT]]

A slash command option that represents an int.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[int, IntParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

autocomplete_with class-attribute instance-attribute #

autocomplete_with: AutocompleteCallbackT[ClientT, ChoiceT] | None = None

The callback for autocompleting the option.

choices class-attribute instance-attribute #

choices: Sequence[ChoiceT | CommandChoice] | Mapping[str, ChoiceT] | None = None

The choices for the option.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

max class-attribute instance-attribute #

max: int | None = None

The maximum value of the option.

min class-attribute instance-attribute #

min: int | None = None

The minimum value of the option.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

IntParams #

IntParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None,
    min: int | None = None,
    max: int | None = None,
    choices: Sequence[int | CommandChoice] | Mapping[str, int] | None = None,
    autocomplete_with: AutocompleteCallbackT[ClientT, int] | None = None
)

Bases: OptionWithChoicesParams[int, ClientT]

The parameters for an int option.

Warning

You cannot provide both choices and autocomplete_with at the same time.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The name of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description_localizations

The description of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

min

The minimum value of the option

TYPE: int | None DEFAULT: None

max

The maximum value of the option

TYPE: int | None DEFAULT: None

choices

The choices for the option. If provided, these will be the only valid values for the option.

TYPE: Sequence[int | CommandChoice] | Mapping[str, int] | None DEFAULT: None

autocomplete_with

The callback that is invoked when the user autocompletes the option

TYPE: AutocompleteCallbackT[ClientT, int] | None DEFAULT: None

autocomplete_with property #

autocomplete_with: AutocompleteCallbackT[ClientT, ChoiceT] | None

The callback for autocompleting the option.

choices property #

choices: Sequence[ChoiceT | CommandChoice] | Mapping[str, ChoiceT] | None

The choices for the option. If provided, these will be the only valid values for the option.

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

max property #

max: int | None

The maximum value of the option.

min property #

min: int | None

The minimum value of the option.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

MemberOption #

Bases: ConverterOption[InteractionMember, ClientT, MemberParams, User]

A slash command option that represents a member.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[hikari.Member, MemberParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

MemberParams #

MemberParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None
)

Bases: OptionParams[InteractionMember]

The parameters for a member option.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The name of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description_localizations

The description of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

MentionableOption #

Bases: CommandOptionBase[Role | User, ClientT, MentionableParams]

A slash command option that represents a user or role.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[hikari.Role | hikari.User, MentionableParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

MentionableParams #

MentionableParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None
)

Bases: OptionParams[Role | User]

The parameters for a mentionable option. This is an option of type hikari.Role | hikari.User.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The name of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description_localizations

The description of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

RoleOption #

Bases: CommandOptionBase[Role, ClientT, RoleParams]

A slash command option that represents a role.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[hikari.Role, RoleParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

RoleParams #

RoleParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None
)

Bases: OptionParams[Role]

The parameters for a user option.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The localizations for the name of the option

TYPE: Optional[Mapping[str, str]] DEFAULT: None

description_localizations

The localizations for the description of the option

TYPE: Optional[Mapping[str, str]] DEFAULT: None

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

StrOption #

Bases: OptionWithChoices[str, ClientT, StrParams[ClientT]]

A slash command option that represents a string.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[str, StrParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

autocomplete_with class-attribute instance-attribute #

autocomplete_with: AutocompleteCallbackT[ClientT, ChoiceT] | None = None

The callback for autocompleting the option.

choices class-attribute instance-attribute #

choices: Sequence[ChoiceT | CommandChoice] | Mapping[str, ChoiceT] | None = None

The choices for the option.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

max_length class-attribute instance-attribute #

max_length: int | None = None

The maximum length of the option.

min_length class-attribute instance-attribute #

min_length: int | None = None

The minimum length of the option.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

StrParams #

StrParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None,
    min_length: int | None = None,
    max_length: int | None = None,
    choices: Sequence[str | CommandChoice] | Mapping[str, str] | None = None,
    autocomplete_with: AutocompleteCallbackT[ClientT, str] | None = None
)

Bases: OptionWithChoicesParams[str, ClientT]

The parameters for a string option.

Warning

You cannot provide both choices and autocomplete_with at the same time.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The name of the option in different locales

TYPE: Mapping[Locale, str] DEFAULT: None

description_localizations

The description of the option in different locales

TYPE: Mapping[Locale, str] DEFAULT: None

min_length

The minimum length of the option

TYPE: int | None DEFAULT: None

max_length

The maximum length of the option

TYPE: int | None DEFAULT: None

choices

The choices for the option. If provided, these will be the only valid values for the option.

TYPE: Sequence[str | CommandChoice] | Mapping[str, str] | None DEFAULT: None

autocomplete_with

The callback that is invoked when the user autocompletes the option

TYPE: AutocompleteCallbackT[ClientT, str] | None DEFAULT: None

autocomplete_with property #

autocomplete_with: AutocompleteCallbackT[ClientT, ChoiceT] | None

The callback for autocompleting the option.

choices property #

choices: Sequence[ChoiceT | CommandChoice] | Mapping[str, ChoiceT] | None

The choices for the option. If provided, these will be the only valid values for the option.

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

max_length property #

max_length: int | None

The maximum length of the option.

min_length property #

min_length: int | None

The minimum length of the option.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.

UserOption #

Bases: CommandOptionBase[User, ClientT, UserParams]

A slash command option that represents a user.

Hint

To add an option of this type to your command, add an argument to your command function with the following type hint:

opt_name: arc.Option[hikari.User, UserParams(...)]

arg_name instance-attribute #

arg_name: str

The name of the parameter this option represents. This is going to be the same as name unless name was overriden.

description instance-attribute #

description: str

The description of the option.

description_localizations class-attribute instance-attribute #

description_localizations: Mapping[Locale, str] = field(factory=dict)

The description of the option in different locales.

is_required class-attribute instance-attribute #

is_required: bool = True

Whether the option is required.

name instance-attribute #

name: str

The name of the option.

name_localizations class-attribute instance-attribute #

name_localizations: Mapping[Locale, str] = field(factory=dict)

The name of the option in different locales.

option_type property #

option_type: OptionType

The type of the option. Used to register the command.

to_command_option #

to_command_option() -> CommandOption

Convert this option to a hikari.CommandOption.

UserParams #

UserParams(
    description: str = "No description provided.",
    *,
    name: str | None = None,
    name_localizations: Mapping[Locale, str] | None = None,
    description_localizations: Mapping[Locale, str] | None = None
)

Bases: OptionParams[User]

The parameters for a user option.

PARAMETER DESCRIPTION
description

The description of the option

TYPE: str DEFAULT: 'No description provided.'

name

The name of the option. If not provided, the name of the parameter will be used.

TYPE: str DEFAULT: None

name_localizations

The name of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description_localizations

The description of the option in different locales

TYPE: Mapping[Locale, str] | None DEFAULT: None

description property #

description: str

The description of the option.

description_localizations property #

description_localizations: Mapping[Locale, str]

The description of the option in different locales.

name property #

name: str | None

The name of the option.

name_localizations property #

name_localizations: Mapping[Locale, str]

The name of the option in different locales.