Struct prelude::Message
zaun_bot::prelude::Message · Struct
pub struct Message { … }Fields
Section titled “Fields”message_id: Id
Section titled “message_id: Id”channel_id: Id
Section titled “channel_id: Id”sequence: u64
Section titled “sequence: u64”author_id: Id
Section titled “author_id: Id”created_at: Timestamp
Section titled “created_at: Timestamp”edited_at: Option<Timestamp>
Section titled “edited_at: Option<Timestamp>”content: String
Section titled “content: String”Empty when the bot lacks message_content (unless it is mentioned).
embeds: Vec<Embed>
Section titled “embeds: Vec<Embed>”components: Vec<Component>
Section titled “components: Vec<Component>”flags: u32
Section titled “flags: u32”Raw flag bits.
reply_to: Option<Id>
Section titled “reply_to: Option<Id>”mentions: Mentions
Section titled “mentions: Mentions”attachments: Vec<Attachment>
Section titled “attachments: Vec<Attachment>”interaction: Option<InteractionMetadata>
Section titled “interaction: Option<InteractionMetadata>”Methods
Section titled “Methods”pub fn reply<impl Into<Reply>>(&self, reply: impl Into<Reply>) -> Result<Id, HostError>Replies in the same channel. Returns the reply’s id.
Errors
Section titled “Errors”The host’s refusal.
pub fn edit<impl Into<Reply>>(&self, reply: impl Into<Reply>) -> Result<(), HostError>Edits it (the bot’s own messages only).
Errors
Section titled “Errors”The host’s refusal.
delete
Section titled “delete”pub fn delete(&self) -> Result<(), HostError>Deletes it (the bot’s own, or any with MANAGE_MESSAGES).
Errors
Section titled “Errors”The host’s refusal.
pub fn react(&self, emoji: &str) -> Result<(), HostError>Adds a reaction.
Errors
Section titled “Errors”The host’s refusal.
unreact
Section titled “unreact”pub fn unreact(&self, emoji: &str) -> Result<(), HostError>Removes the bot’s own reaction.
Errors
Section titled “Errors”The host’s refusal.
Trait implementations
Section titled “Trait implementations”Clone, Debug