View Source Nostrum.Struct.ApplicationCommandInteractionDataOption (Nostrum v0.10.0)
Struct for command invocation arguments.
Summary
Types
@type focused() :: boolean() | nil
Whether this parameter is focused for autocomplete
interactions.
@type name() :: String.t()
Parameter name
@type options() :: [t()] | nil
Parameter options for subcommands.
Mutually exclusive with value
.
@type t() :: %Nostrum.Struct.ApplicationCommandInteractionDataOption{ focused: focused(), name: name(), options: options(), type: type(), value: value() }
Command interaction data struct
@type type() :: 1..10
The application command option type.
See https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type for more details.
You can use one of the Nostrum.Constants.ApplicationCommandOptionType
methods.
@type value() :: String.t() | integer() | boolean() | number() | Nostrum.Struct.User.id() | Nostrum.Struct.Channel.id() | Nostrum.Struct.Guild.Role.id() | nil
Parameter value.
The type of this depends on the type/0
:
- For
type/0
of3
, this will be aString.t/0
. - For
type/0
of4
, this will be ainteger/0
. - For
type/0
of5
, this will be aboolean/0
. - For
type/0
of6
, this will be aNostrum.Struct.User.id/0
. The corresponding guild member and user can be looked up inNostrum.Struct.ApplicationCommandInteractionData.resolved/0
. - For
type/0
of7
, this will be aNostrum.Struct.Channel.id/0
. The corresponding channel can be looked up inNostrum.Struct.ApplicationCommandInteractionData.resolved/0
. - For
type/0
of8
, this will be aNostrum.Struct.Guild.Role.id/0
. The corresponding role can be looked up inNostrum.Struct.ApplicationCommandInteractionData.resolved/0
. - For
type/0
of9
, this will be aNostrum.Struct.User.id/0
orNostrum.Struct.Guild.Role.id/0
. The corresponding user or role can be looked up inNostrum.Struct.ApplicationCommandInteractionData.resolved/0
. - For
type/0
of10
, this will be anumber/0
.
Mutually exclusive with options
. If options
is not nil
, this will be nil
.