[][src]Struct spectacles_model::message::Message

pub struct Message {
    pub id: String,
    pub channel_id: String,
    pub guild_id: String,
    pub author: User,
    pub content: String,
    pub member: GuildMember,
    pub timestamp: String,
    pub edited_timestamp: Option<String>,
    pub tts: bool,
    pub mention_everyone: bool,
    pub mention_roles: Vec<String>,
    pub attachments: Vec<MessageAttachment>,
    pub embeds: Vec<Embed>,
    pub reactions: Vec<MessageReaction>,
    pub nonce: Option<String>,
    pub pinned: bool,
    pub webhook_id: String,
    pub kind: MessageType,
    pub activity: MessageActivity,
    pub application: MessageApplication,
}

A message sent in a channel on Discord.

Fields

id: String

The message ID of the message.

channel_id: String

The ID of the channel that the message was sent in.

guild_id: String

The ID of the guild that the message was sent in.

author: User

The author of the message.

content: String

The contents of this message.

member: GuildMember

The guild member form of the message author.

timestamp: String

The time that this message was sent.

edited_timestamp: Option<String>

When this message was edited, if applicable.

tts: bool

Whether or not this was a TTS message.

mention_everyone: bool

Whether or not this message mentioned everyone.

mention_roles: Vec<String>

Roles that were mentioned in this message.

attachments: Vec<MessageAttachment>

The message's attached files, if any.

embeds: Vec<Embed>

Any embeds sent with this message.

reactions: Vec<MessageReaction>

The message's reactions.

nonce: Option<String>

A snowflake used to validate that a message was sent.

pinned: bool

Whether or not the message is pinned.

webhook_id: String

The ID of the webhook if the message was sent by a webhook.

kind: MessageType

The type of message sent.

activity: MessageActivity

Message Activity sent with rich-presence embeds.

application: MessageApplication

Message Application ent with Rich Presence embeds.

Trait Implementations

impl Clone for Message[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Message[src]

impl Serialize for Message[src]

impl<'de> Deserialize<'de> for Message[src]

Auto Trait Implementations

impl Send for Message

impl Sync for Message

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]