Struct twilight_model::application::command::ChoiceCommandOptionData
source · [−]pub struct ChoiceCommandOptionData {
pub autocomplete: bool,
pub choices: Vec<CommandOptionChoice>,
pub description: String,
pub description_localizations: Option<HashMap<String, String>>,
pub max_length: Option<u16>,
pub min_length: Option<u16>,
pub name: String,
pub name_localizations: Option<HashMap<String, String>>,
pub required: bool,
}Expand description
Data supplied to a CommandOption of type String.
Fields
autocomplete: boolWhether the command supports autocomplete.
choices: Vec<CommandOptionChoice>Predetermined choices may be defined for a user to select.
When completing this option, the user is prompted with a selector of all available choices.
If no choices are available, the user must input a value manually.
description: StringDescription of the option. It must be 100 characters or less.
description_localizations: Option<HashMap<String, String>>Localization dictionary for the description field.
max_length: Option<u16>Maximum allowed length.
Must be at least 1 and at most 6000.
min_length: Option<u16>Minimum allowed length.
Must be at most 6000.
name: StringName of the option. It must be 32 characters or less.
name_localizations: Option<HashMap<String, String>>Localization dictionary for the name field.
Keys should be valid locales. See Discord Docs/Locales, Discord Docs/Localization.
required: boolWhether or not the option is required to be completed by a user.
Trait Implementations
sourceimpl Clone for ChoiceCommandOptionData
impl Clone for ChoiceCommandOptionData
sourcefn clone(&self) -> ChoiceCommandOptionData
fn clone(&self) -> ChoiceCommandOptionData
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more