Skip to content

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).

Host-assigned id.

The author.

≤ 4 000 scalars; empty only when the message has an attachment or an embed.

Rich embeds; absent when none.

Components (bots only); absent when none.

Message flags; absent when 0.

interaction_metadata: Option<Box<InteractionMetadata>>

Section titled “interaction_metadata: Option<Box<InteractionMetadata>>”

The interaction this message answers.

The message replied to.

Who is mentioned (as honoured by the host).

Attachments, in the order the author listed them.

Clone, Debug, Deserialize<'de>, Eq, PartialEq, Serialize, StructuralPartialEq

Full rustdoc page