pub struct MessageCreated {
pub message_id: MessageId,
pub author_id: MemberId,
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>,
}Expand description
message.created (§7.4, §9.2).
SPEC: §9.2 says “message object”, but the §7.4 example body has only message_id,
author_id, content, reply_to, mentions and attachments; channel_id,
sequence and created_at are on the envelope, and a new message has no reactions. This
type follows §7.4; a host sending the full §8.5 object still parses (extra fields are
ignored).
Fields§
§message_id: MessageIdHost-assigned id.
The author.
content: String≤ 4 000 scalars; empty only when the message has an attachment or an embed.
embeds: Vec<Embed>Rich embeds; absent when none.
components: Vec<Component>Components (bots only); absent when none.
flags: u32Message flags; 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 (as honoured by the host).
attachments: Vec<Attachment>Attachments, in the order the author listed them.
Trait Implementations§
Source§impl Clone for MessageCreated
impl Clone for MessageCreated
Source§fn clone(&self) -> MessageCreated
fn clone(&self) -> MessageCreated
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MessageCreated
impl Debug for MessageCreated
Source§impl<'de> Deserialize<'de> for MessageCreated
impl<'de> Deserialize<'de> for MessageCreated
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 MessageCreated
Source§impl PartialEq for MessageCreated
impl PartialEq for MessageCreated
Source§impl Serialize for MessageCreated
impl Serialize for MessageCreated
impl StructuralPartialEq for MessageCreated
Auto Trait Implementations§
impl Freeze for MessageCreated
impl RefUnwindSafe for MessageCreated
impl Send for MessageCreated
impl Sync for MessageCreated
impl Unpin for MessageCreated
impl UnsafeUnpin for MessageCreated
impl UnwindSafe for MessageCreated
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