pub struct Message {Show 15 fields
pub message_id: MessageId,
pub channel_id: ChannelId,
pub sequence: u64,
pub author_id: MemberId,
pub created_at: u64,
pub edited_at: Option<u64>,
pub content: String,
pub embeds: Vec<Embed>,
pub components: Vec<Component>,
pub flags: u32,
pub interaction_metadata: Option<Box<InteractionMetadata>>,
pub reply_to: Option<MessageId>,
pub mentions: Mentions,
pub attachments: Vec<Attachment>,
pub reactions: Vec<ReactionCount>,
}Expand description
A stored message as returned by message.history (§8.5).
Fields§
§message_id: MessageIdHost-assigned id.
channel_id: ChannelIdThe channel.
sequence: u64Its channel_seq.
The author, from the connection binding.
created_at: u64Acceptance time, ms.
edited_at: Option<u64>Last edit time, ms.
content: String≤ 4 000 scalars; empty only when the message has an attachment or an embed.
embeds: Vec<Embed>Rich embeds, in the author’s order; absent when none.
components: Vec<Component>Components (bots only, §8.14); absent when none.
flags: u32Message flags (§8.14); absent when 0.
interaction_metadata: Option<Box<InteractionMetadata>>The interaction this message answers.
reply_to: Option<MessageId>The message replied to.
mentions: MentionsWho is mentioned.
attachments: Vec<Attachment>Attachments, in the order the author listed them.
reactions: Vec<ReactionCount>Reaction counts.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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 Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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