Struct event::MessageCreated
zaun_community_protocol::event::MessageCreated · Struct
pub struct MessageCreated { … }message.created.
SPEC: the protocol says “message object”, but the the protocol 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 the protocol; a host sending the full the protocol object still parses (extra fields are
ignored).
Fields
Section titled “Fields”message_id: MessageId
Section titled “message_id: MessageId”Host-assigned id.
author_id: MemberId
Section titled “author_id: MemberId”The author.
content: String
Section titled “content: String”≤ 4 000 scalars; empty only when the message has an attachment or an embed.
embeds: Vec<Embed>
Section titled “embeds: Vec<Embed>”Rich embeds; absent when none.
components: Vec<Component>
Section titled “components: Vec<Component>”Components (bots only); absent when none.
flags: u32
Section titled “flags: u32”Message flags; absent when 0.
interaction_metadata: Option<Box<InteractionMetadata>>
Section titled “interaction_metadata: Option<Box<InteractionMetadata>>”The interaction this message answers.
reply_to: Option<MessageId>
Section titled “reply_to: Option<MessageId>”The message replied to.
mentions: Mentions
Section titled “mentions: Mentions”Who is mentioned (as honoured by the host).
attachments: Vec<Attachment>
Section titled “attachments: Vec<Attachment>”Attachments, in the order the author listed them.
Trait implementations
Section titled “Trait implementations”Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, StructuralPartialEq