using Maki.Structures.Embeds; using Maki.Structures.Users; using Newtonsoft.Json; using System; namespace Maki.Structures.Messages { /// /// Discord API Message structure /// internal struct Message { /// /// id of the message /// [JsonProperty("id")] public ulong Id; /// /// id of the channel the message was sent in /// [JsonProperty("channel_id")] public ulong ChannelId; /// /// the author of this message (doesn't contain a valid user when sent by webhook) /// [JsonProperty("author")] public User User; /// /// contents of the message /// [JsonProperty("content")] public string Content; /// /// when this message was sent /// [JsonProperty("timestamp")] public DateTime Sent; /// /// when this message was edited (or null if never) /// [JsonProperty("edited_timestamp")] public DateTime? Edited; /// /// whether this was a TTS message /// [JsonProperty("tts")] public bool IsTTS; /// /// whether this message mentions everyone /// [JsonProperty("mention_everyone")] public bool MentioningEveryone; /// /// users specifically mentioned in the message /// [JsonProperty("mentions")] public User[] Mentions; /// /// roles specifically mentioned in this message /// [JsonProperty("mention_roles")] public ulong[] MentionsRoles; /// /// any attached files /// [JsonProperty("attachments")] public Attachment[] Attachments; /// /// any embedded content /// [JsonProperty("embeds")] public Embed[] Embeds; /// /// reactions to the message /// Not actually populated ever??? /// [JsonProperty("reactions")] public MessageReaction[] Reactions; /// /// used for validating a message was sent /// [JsonProperty("nonce")] public long? Nonce; /// /// whether this message is pinned /// [JsonProperty("pinned")] public bool IsPinned; /// /// if the message is generated by a webhook, this is the webhook's id /// [JsonProperty("webhook_id")] public string WebhookId; } }