#[non_exhaustive]pub struct AutoPopulatedSelect {
pub id: Option<i32>,
pub custom_id: CompactString,
pub placeholder: Option<CompactString>,
pub default_values: Vec<SelectDefaultValue>,
pub min_values: Option<u8>,
pub max_values: Option<u8>,
pub required: bool,
pub disabled: bool,
}Expand description
A select menu whose options Discord fills in: the user,
role and
mentionable
selects share this structure (see ChannelSelect for channels).
discord.js counterpart: UserSelectMenuComponent, RoleSelectMenuComponent,
MentionableSelectMenuComponent.
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.id: Option<i32>The component’s numeric identifier (generated by Discord when not set).
custom_id: CompactStringThe developer-defined identifier (1-100 characters).
placeholder: Option<CompactString>The text shown when nothing is selected (max 150 characters).
default_values: Vec<SelectDefaultValue>The entities selected by default; their number must be within min_values and
max_values.
min_values: Option<u8>The minimum number of entities to choose (Discord’s default: 1; 0-25).
max_values: Option<u8>The maximum number of entities to choose (Discord’s default: 1; max 25).
required: boolWhether an answer is required in a modal (default true; ignored in messages).
disabled: boolWhether the menu is disabled (messages only; modals reject it).
Implementations§
Source§impl AutoPopulatedSelect
impl AutoPopulatedSelect
Sourcepub fn new(custom_id: impl Into<CompactString>) -> Self
pub fn new(custom_id: impl Into<CompactString>) -> Self
Creates a select menu.
discord.js counterpart: UserSelectMenuBuilder and its siblings (@discordjs/builders).