View Source Nostrum.Struct.ApplicationCommandInteractionDataOption (Nostrum v0.10.4)
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/0of3, this will be aString.t/0. - For
type/0of4, this will be ainteger/0. - For
type/0of5, this will be aboolean/0. - For
type/0of6, 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/0of7, this will be aNostrum.Struct.Channel.id/0. The corresponding channel can be looked up inNostrum.Struct.ApplicationCommandInteractionData.resolved/0. - For
type/0of8, this will be aNostrum.Struct.Guild.Role.id/0. The corresponding role can be looked up inNostrum.Struct.ApplicationCommandInteractionData.resolved/0. - For
type/0of9, this will be aNostrum.Struct.User.id/0orNostrum.Struct.Guild.Role.id/0. The corresponding user or role can be looked up inNostrum.Struct.ApplicationCommandInteractionData.resolved/0. - For
type/0of10, this will be anumber/0.
Mutually exclusive with options. If options is not nil, this will be nil.