#[non_exhaustive]pub struct MessageInteraction {
pub id: InteractionId,
pub kind: InteractionType,
pub name: CompactString,
pub user: User,
pub member: Option<Box<PartialMember>>,
}Expand description
The interaction a message responds to
(Message::interaction).
Deprecated by Discord in favor of
Message::interaction_metadata.
discord.js counterpart: MessageInteraction (Message#interaction).
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: InteractionIdThe interaction’s ID.
kind: InteractionTypeThe kind of interaction.
name: CompactStringThe name of the command, including subcommands and subcommand groups.
user: UserThe user who invoked the interaction.
member: Option<Box<PartialMember>>The member who invoked the interaction, in guilds.
Trait Implementations§
Source§impl Clone for MessageInteraction
impl Clone for MessageInteraction
Source§impl Debug for MessageInteraction
impl Debug for MessageInteraction
Source§impl<'de> Deserialize<'de> for MessageInteraction
impl<'de> Deserialize<'de> for MessageInteraction
Source§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
impl Eq for MessageInteraction
Source§impl PartialEq for MessageInteraction
impl PartialEq for MessageInteraction
Source§impl Serialize for MessageInteraction
impl Serialize for MessageInteraction
impl StructuralPartialEq for MessageInteraction
Auto Trait Implementations§
impl Freeze for MessageInteraction
impl RefUnwindSafe for MessageInteraction
impl Send for MessageInteraction
impl Sync for MessageInteraction
impl Unpin for MessageInteraction
impl UnsafeUnpin for MessageInteraction
impl UnwindSafe for MessageInteraction
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