Struct serenity::model::interactions::application_command::ApplicationCommandOption [−][src]
#[non_exhaustive]pub struct ApplicationCommandOption {
pub kind: ApplicationCommandOptionType,
pub name: String,
pub description: String,
pub required: bool,
pub choices: Vec<ApplicationCommandOptionChoice>,
pub options: Vec<ApplicationCommandOption>,
pub channel_types: Vec<ChannelType>,
pub min_value: Option<Number>,
pub max_value: Option<Number>,
}
Expand description
The parameters for an ApplicationCommand
.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.kind: ApplicationCommandOptionType
The option type.
name: String
The option name.
description: String
The option description.
required: bool
Whether the parameter is optional or required.
choices: Vec<ApplicationCommandOptionChoice>
Choices the user can pick from.
Note: Only available for String
and Integer
ApplicationCommandOptionType
.
options: Vec<ApplicationCommandOption>
The nested options.
Note: Only available for SubCommand
or SubCommandGroup
.
channel_types: Vec<ChannelType>
If the option is a Channel
, it will only be able to show these types.
min_value: Option<Number>
Minimum permitted value for Integer or Number options
max_value: Option<Number>
Maximum permitted value for Integer or Number options
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for ApplicationCommandOption
impl Send for ApplicationCommandOption
impl Sync for ApplicationCommandOption
impl Unpin for ApplicationCommandOption
impl UnwindSafe for ApplicationCommandOption
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more