#[non_exhaustive]pub struct MessageUpdateEvent {Show 32 fields
pub id: MessageId,
pub channel_id: ChannelId,
pub author: Option<User>,
pub content: Option<String>,
pub timestamp: Option<Timestamp>,
pub edited_timestamp: Option<Timestamp>,
pub tts: Option<bool>,
pub mention_everyone: Option<bool>,
pub mentions: Option<Vec<User>>,
pub mention_roles: Option<Vec<RoleId>>,
pub mention_channels: Option<Vec<ChannelMention>>,
pub attachments: Option<Vec<Attachment>>,
pub embeds: Option<Vec<Embed>>,
pub reactions: Option<Vec<MessageReaction>>,
pub pinned: Option<bool>,
pub webhook_id: Option<Option<WebhookId>>,
pub kind: Option<MessageType>,
pub activity: Option<Option<MessageActivity>>,
pub application: Option<Option<MessageApplication>>,
pub application_id: Option<Option<ApplicationId>>,
pub message_reference: Option<Option<MessageReference>>,
pub flags: Option<Option<MessageFlags>>,
pub referenced_message: Option<Option<Box<Message>>>,
pub interaction: Option<Option<Box<MessageInteraction>>>,
pub interaction_metadata: Option<Option<Box<MessageInteractionMetadata>>>,
pub thread: Option<Option<GuildChannel>>,
pub components: Option<Vec<ActionRow>>,
pub sticker_items: Option<Vec<StickerItem>>,
pub position: Option<Option<u64>>,
pub role_subscription_data: Option<Option<RoleSubscriptionData>>,
pub guild_id: Option<GuildId>,
pub member: Option<Option<Box<PartialMember>>>,
}
Expand description
Requires GatewayIntents::GUILD_MESSAGES
.
Contains identical fields to Message
, except everything but id
and channel_id
are
optional. Even fields that cannot change in a message update event are included, because Discord
may include them anyways, independent from whether they have actually changed (like
Self::guild_id
)
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: MessageId
§channel_id: ChannelId
§content: Option<String>
§timestamp: Option<Timestamp>
§edited_timestamp: Option<Timestamp>
§tts: Option<bool>
§mention_everyone: Option<bool>
§mentions: Option<Vec<User>>
§mention_roles: Option<Vec<RoleId>>
§mention_channels: Option<Vec<ChannelMention>>
§attachments: Option<Vec<Attachment>>
§embeds: Option<Vec<Embed>>
§reactions: Option<Vec<MessageReaction>>
§pinned: Option<bool>
§webhook_id: Option<Option<WebhookId>>
§kind: Option<MessageType>
§activity: Option<Option<MessageActivity>>
§application: Option<Option<MessageApplication>>
§application_id: Option<Option<ApplicationId>>
§message_reference: Option<Option<MessageReference>>
§flags: Option<Option<MessageFlags>>
§referenced_message: Option<Option<Box<Message>>>
§interaction: Option<Option<Box<MessageInteraction>>>
👎Deprecated: Use interaction_metadata
§interaction_metadata: Option<Option<Box<MessageInteractionMetadata>>>
§thread: Option<Option<GuildChannel>>
§components: Option<Vec<ActionRow>>
§sticker_items: Option<Vec<StickerItem>>
§position: Option<Option<u64>>
§role_subscription_data: Option<Option<RoleSubscriptionData>>
§guild_id: Option<GuildId>
§member: Option<Option<Box<PartialMember>>>
Implementations§
Source§impl MessageUpdateEvent
impl MessageUpdateEvent
Sourcepub fn apply_to_message(&self, message: &mut Message)
pub fn apply_to_message(&self, message: &mut Message)
Writes the updated data in this message update event into the given Message
.
Trait Implementations§
Source§impl CacheUpdate for MessageUpdateEvent
impl CacheUpdate for MessageUpdateEvent
Source§impl Clone for MessageUpdateEvent
impl Clone for MessageUpdateEvent
Source§fn clone(&self) -> MessageUpdateEvent
fn clone(&self) -> MessageUpdateEvent
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 MessageUpdateEvent
impl Debug for MessageUpdateEvent
Source§impl<'de> Deserialize<'de> for MessageUpdateEvent
impl<'de> Deserialize<'de> for MessageUpdateEvent
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
Auto Trait Implementations§
impl Freeze for MessageUpdateEvent
impl RefUnwindSafe for MessageUpdateEvent
impl Send for MessageUpdateEvent
impl Sync for MessageUpdateEvent
impl Unpin for MessageUpdateEvent
impl UnwindSafe for MessageUpdateEvent
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