Struct serenity::builder::CreateAutocompleteResponse
source · pub struct CreateAutocompleteResponse(pub HashMap<&'static str, Value>);Available on crate feature
builder only.Tuple Fields§
§0: HashMap<&'static str, Value>Implementations§
source§impl CreateAutocompleteResponse
impl CreateAutocompleteResponse
sourcepub fn set_choices(&mut self, choices: Value) -> &mut Self
pub fn set_choices(&mut self, choices: Value) -> &mut Self
For autocomplete responses this sets their autocomplete suggestions.
See the official docs on Application Command Option Choices for more information.
sourcepub fn add_int_choice<D: ToString>(&mut self, name: D, value: i64) -> &mut Self
pub fn add_int_choice<D: ToString>(&mut self, name: D, value: i64) -> &mut Self
Add an int autocomplete choice.
Note: There can be no more than 25 choices set. Name must be between 1 and 100 characters. Value must be between -2^53 and 2^53.
sourcepub fn add_string_choice<D: ToString, E: ToString>(
&mut self,
name: D,
value: E
) -> &mut Self
pub fn add_string_choice<D: ToString, E: ToString>( &mut self, name: D, value: E ) -> &mut Self
Adds a string autocomplete choice.
Note: There can be no more than 25 choices set. Name must be between 1 and 100 characters. Value must be up to 100 characters.
sourcepub fn add_number_choice<D: ToString>(
&mut self,
name: D,
value: f64
) -> &mut Self
pub fn add_number_choice<D: ToString>( &mut self, name: D, value: f64 ) -> &mut Self
Adds a number autocomplete choice.
Note: There can be no more than 25 choices set. Name must be between 1 and 100 characters. Value must be between -2^53 and 2^53.
Trait Implementations§
source§impl Clone for CreateAutocompleteResponse
impl Clone for CreateAutocompleteResponse
source§fn clone(&self) -> CreateAutocompleteResponse
fn clone(&self) -> CreateAutocompleteResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CreateAutocompleteResponse
impl Debug for CreateAutocompleteResponse
source§impl Default for CreateAutocompleteResponse
impl Default for CreateAutocompleteResponse
source§fn default() -> CreateAutocompleteResponse
fn default() -> CreateAutocompleteResponse
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for CreateAutocompleteResponse
impl Send for CreateAutocompleteResponse
impl Sync for CreateAutocompleteResponse
impl Unpin for CreateAutocompleteResponse
impl UnwindSafe for CreateAutocompleteResponse
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more