pub struct Message {Show 30 fields
pub id: Snowflake,
pub channel_id: Snowflake,
pub author: User,
pub content: String,
pub timestamp: String,
pub edited_timestamp: Option<String>,
pub tts: bool,
pub mention_everyone: bool,
pub mentions: Vec<User>,
pub mention_roles: Vec<Snowflake>,
pub attachments: Vec<Attachment>,
pub embeds: Vec<Embed>,
pub reactions: Option<Vec<Reaction>>,
pub nonce: Option<Value>,
pub pinned: bool,
pub webhook_id: Option<Snowflake>,
pub message_type: u8,
pub activity: Option<MessageActivity>,
pub application: Option<Value>,
pub application_id: Option<Snowflake>,
pub message_reference: Option<MessageReference>,
pub flags: Option<u32>,
pub referenced_message: Option<Box<Message>>,
pub interaction: Option<Value>,
pub thread: Option<Value>,
pub components: Option<Vec<Value>>,
pub sticker_items: Option<Vec<Value>>,
pub poll: Option<Poll>,
pub guild_id: Option<Snowflake>,
pub member: Option<Value>,
}
Fields§
§id: Snowflake
§channel_id: Snowflake
§content: String
§timestamp: String
§edited_timestamp: Option<String>
§tts: bool
§mention_everyone: bool
§mentions: Vec<User>
§mention_roles: Vec<Snowflake>
§attachments: Vec<Attachment>
§embeds: Vec<Embed>
§reactions: Option<Vec<Reaction>>
§nonce: Option<Value>
§pinned: bool
§webhook_id: Option<Snowflake>
§message_type: u8
§activity: Option<MessageActivity>
§application: Option<Value>
§application_id: Option<Snowflake>
§message_reference: Option<MessageReference>
§flags: Option<u32>
§referenced_message: Option<Box<Message>>
§interaction: Option<Value>
§thread: Option<Value>
§components: Option<Vec<Value>>
§sticker_items: Option<Vec<Value>>
§poll: Option<Poll>
§guild_id: Option<Snowflake>
§member: Option<Value>
Implementations§
Source§impl Message
Helper methods for Message
impl Message
Helper methods for Message
pub async fn reply( &self, http: &HttpClient, content: impl Into<String>, ) -> Result<Message>
pub async fn react(&self, http: &HttpClient, emoji: &str) -> Result<()>
pub async fn delete(&self, http: &HttpClient) -> Result<()>
pub async fn edit( &self, http: &HttpClient, content: impl Into<String>, ) -> Result<Message>
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 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