pub struct Message {Show 21 fields
pub id: Snowflake,
pub channel_id: Option<Snowflake>,
pub guild_id: Option<Snowflake>,
pub author: User,
pub member: Option<Member>,
pub content: Option<String>,
pub timestamp: Option<String>,
pub edited_timestamp: Option<String>,
pub tts: Option<bool>,
pub mention_everyone: Option<bool>,
pub mentions: Option<Vec<User>>,
pub mention_roles: Option<Vec<Snowflake>>,
pub attachments: Option<Vec<Attachment>>,
pub embeds: Option<Vec<Embed>>,
pub reactions: Option<Vec<Reaction>>,
pub pinned: Option<bool>,
pub webhook_id: Option<Snowflake>,
pub kind: Option<u8>,
pub referenced_message: Option<Box<Message>>,
pub flags: Option<u64>,
pub stickers: Option<Vec<Value>>,
}Expand description
A message sent in a channel.
Fields§
§id: Snowflake§channel_id: Option<Snowflake>§guild_id: Option<Snowflake>§member: Option<Member>Only present in guild messages.
content: Option<String>§timestamp: Option<String>§edited_timestamp: Option<String>§tts: Option<bool>§mention_everyone: Option<bool>§mentions: Option<Vec<User>>§mention_roles: Option<Vec<Snowflake>>§attachments: Option<Vec<Attachment>>§embeds: Option<Vec<Embed>>§reactions: Option<Vec<Reaction>>§pinned: Option<bool>§webhook_id: Option<Snowflake>§kind: Option<u8>0 = default, 19 = reply, etc.
referenced_message: Option<Box<Message>>§flags: Option<u64>§stickers: Option<Vec<Value>>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
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