Struct discord_flows::model::autocomplete::AutocompleteInteraction
source · pub struct AutocompleteInteraction {Show 13 fields
pub id: InteractionId,
pub application_id: ApplicationId,
pub kind: InteractionType,
pub data: CommandData,
pub guild_id: Option<GuildId>,
pub channel_id: ChannelId,
pub member: Option<Member>,
pub user: User,
pub token: String,
pub version: u8,
pub app_permissions: Option<Permissions>,
pub locale: String,
pub guild_locale: Option<String>,
}Expand description
An interaction received when the user fills in an autocomplete option
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: InteractionIdId of the interaction.
application_id: ApplicationIdId of the application this interaction is for.
kind: InteractionTypeThe type of interaction.
data: CommandDataThe data of the interaction which was triggered.
guild_id: Option<GuildId>The guild Id this interaction was sent from, if there is one.
channel_id: ChannelIdThe channel Id this interaction was sent from.
member: Option<Member>The member data for the invoking user.
Note: It is only present if the interaction is triggered in a guild.
user: UserThe user object for the invoking user.
token: StringA continuation token for responding to the interaction.
version: u8Always 1.
app_permissions: Option<Permissions>Permissions the app or bot has within the channel the interaction was sent from.
locale: StringThe selected language of the invoking user.
guild_locale: Option<String>The guild’s preferred locale.
Trait Implementations§
source§impl Clone for AutocompleteInteraction
impl Clone for AutocompleteInteraction
source§fn clone(&self) -> AutocompleteInteraction
fn clone(&self) -> AutocompleteInteraction
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 AutocompleteInteraction
impl Debug for AutocompleteInteraction
source§impl<'de> Deserialize<'de> for AutocompleteInteraction
impl<'de> Deserialize<'de> for AutocompleteInteraction
source§fn deserialize<D>(
deserializer: D
) -> Result<AutocompleteInteraction, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<AutocompleteInteraction, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for AutocompleteInteraction
impl Serialize for AutocompleteInteraction
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for AutocompleteInteraction
impl Send for AutocompleteInteraction
impl Sync for AutocompleteInteraction
impl Unpin for AutocompleteInteraction
impl UnwindSafe for AutocompleteInteraction
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