Search Results for

    Show / Hide Table of Contents

    Class DiscordMessageData

    Represents a discord Message Structure API model. Docs: https://discord.com/developers/docs/resources/channel#message-object-message-structure

    Inheritance
    Object
    DiscordMessageData
    Implements
    IEquatable<DiscordMessageData>
    Inherited Members
    System.Object.Equals(System.Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Object.ToString()
    Namespace: Color_Chan.Discord.Core.Common.API.DataModels.Message
    Assembly: Color-Chan.Discord.Core.dll
    Syntax
    public class DiscordMessageData : IEquatable<DiscordMessageData>

    Properties

    | Improve this Doc View Source

    Activity

    The activity data, Sent with Rich Presence-related chat embeds.

    Declaration
    [JsonPropertyName("activity")]
    public DiscordMessageActivityData Activity { get; set; }
    Property Value
    Type Description
    DiscordMessageActivityData
    | Improve this Doc View Source

    Application

    The application data, sent with Rich Presence-related chat embeds.

    Declaration
    [JsonPropertyName("Application")]
    public DiscordApplicationData Application { get; set; }
    Property Value
    Type Description
    DiscordApplicationData
    | Improve this Doc View Source

    ApplicationId

    If the message is a response to an Interaction, this is the id of the interaction's application.

    Declaration
    [JsonPropertyName("application_id")]
    public ulong? ApplicationId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.UInt64>
    | Improve this Doc View Source

    Attachments

    Any attached files.

    Declaration
    [JsonPropertyName("attachments")]
    public IEnumerable<DiscordAttachmentData> Attachments { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<DiscordAttachmentData>
    | Improve this Doc View Source

    Author

    The author of this message.

    Declaration
    [JsonPropertyName("author")]
    public DiscordUserData Author { get; set; }
    Property Value
    Type Description
    DiscordUserData
    Remarks

    Only available when the message is created by a user or a bot. Not when the message is create by a webhook.

    | Improve this Doc View Source

    ChannelId

    Id of the channel the message was sent in.

    Declaration
    [JsonPropertyName("channel_id")]
    public ulong? ChannelId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.UInt64>
    | Improve this Doc View Source

    Components

    Sent if the message contains components like buttons, action rows, or other interactive components.

    Declaration
    [JsonPropertyName("components")]
    public IEnumerable<DiscordComponentData> Components { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<DiscordComponentData>
    | Improve this Doc View Source

    Content

    Contents of the message.

    Declaration
    [JsonPropertyName("content")]
    public string Content { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    EditedTimestamp

    When this message was edited (or null if never).

    Declaration
    [JsonPropertyName("edited_timestamp")]
    public DateTimeOffset? EditedTimestamp { get; set; }
    Property Value
    Type Description
    System.Nullable<DateTimeOffset>
    | Improve this Doc View Source

    Embeds

    Any embedded content.

    Declaration
    [JsonPropertyName("embeds")]
    public IEnumerable<DiscordEmbedData> Embeds { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<DiscordEmbedData>
    | Improve this Doc View Source

    Flags

    Message flags combined as a bitfield.

    Declaration
    [JsonPropertyName("lags")]
    public DiscordMessageFlags? Flags { get; set; }
    Property Value
    Type Description
    System.Nullable<DiscordMessageFlags>
    | Improve this Doc View Source

    GuildId

    Id of the guild the message was sent in.

    Declaration
    [JsonPropertyName("guild_id")]
    public ulong? GuildId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.UInt64>
    | Improve this Doc View Source

    Id

    The Discord provided snowflake id.

    Declaration
    [JsonPropertyName("id")]
    public ulong Id { get; set; }
    Property Value
    Type Description
    System.UInt64
    | Improve this Doc View Source

    Interaction

    Sent if the message is a response to an Interaction.

    Declaration
    [JsonPropertyName("interaction")]
    public DiscordInteractionData Interaction { get; set; }
    Property Value
    Type Description
    DiscordInteractionData
    | Improve this Doc View Source

    IsPinned

    Whether this message is pinned.

    Declaration
    [JsonPropertyName("pinned")]
    public bool IsPinned { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    IsTts

    Whether this was a TTS message.

    Declaration
    [JsonPropertyName("tts")]
    public bool IsTts { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Member

    Member properties for this message's author.

    Declaration
    [JsonPropertyName("member")]
    public DiscordGuildMemberData Member { get; set; }
    Property Value
    Type Description
    DiscordGuildMemberData
    Remarks

    The member object exists in MESSAGE_CREATE and MESSAGE_UPDATE events from text-based guild channels, provided that the author of the message is not a webhook. This allows bots to obtain real-time member data without requiring bots to store member state in memory.

    | Improve this Doc View Source

    MentionEveryone

    Whether this message mentions everyone.

    Declaration
    [JsonPropertyName("mention_everyone")]
    public bool MentionEveryone { get; set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Mentions

    Users specifically mentioned in the message.

    Declaration
    [JsonPropertyName("mentions")]
    public IEnumerable<DiscordUserData> Mentions { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<DiscordUserData>
    | Improve this Doc View Source

    MentionsChannel

    Channels specifically mentioned in this message.

    Declaration
    [JsonPropertyName("mention_channels")]
    public IEnumerable<ulong> MentionsChannel { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.UInt64>
    | Improve this Doc View Source

    MentionsRoles

    Roles specifically mentioned in this message.

    Declaration
    [JsonPropertyName("mention_roles")]
    public IEnumerable<ulong> MentionsRoles { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.UInt64>
    | Improve this Doc View Source

    Nonce

    Used for validating a message was sent.

    Declaration
    [JsonPropertyName("nonce")]
    public string Nonce { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Reactions

    Reactions to the message.

    Declaration
    [JsonPropertyName("reactions")]
    public IEnumerable<DiscordReactionData> Reactions { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<DiscordReactionData>
    | Improve this Doc View Source

    ReferencedMessage

    The message associated with ReferenceMessage.

    Declaration
    [JsonPropertyName("referenced_message")]
    public DiscordMessageData ReferencedMessage { get; set; }
    Property Value
    Type Description
    DiscordMessageData
    Remarks

    This field is only returned for messages with a type of 19 (REPLY) or 21 (THREAD_STARTER_MESSAGE). If the message is a reply but the referenced_message field is not present, the backend did not attempt to fetch the message that was being replied to, so its state is unknown. If the field exists but is null, the referenced message was deleted.

    | Improve this Doc View Source

    ReferenceMessage

    Data showing the source of a cross post, channel follow add, pin, or reply message.

    Declaration
    [JsonPropertyName("message_reference")]
    public DiscordMessageReferenceData ReferenceMessage { get; set; }
    Property Value
    Type Description
    DiscordMessageReferenceData
    | Improve this Doc View Source

    StickerItems

    Sent if the message contains stickers.

    Declaration
    [JsonPropertyName("sticker_items")]
    public IEnumerable<DiscordMessageStickerItemData> StickerItems { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<DiscordMessageStickerItemData>
    Remarks

    Bots cannot send stickers.

    | Improve this Doc View Source

    Stickers

    the stickers sent with the message

    Declaration
    [Obsolete("Replaced with sticker_items")]
    [JsonPropertyName("stickers")]
    public IEnumerable<DiscordStickerData> Stickers { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<DiscordStickerData>
    | Improve this Doc View Source

    Thread

    The thread that was started from this message, includes thread member object.

    Declaration
    [JsonPropertyName("thread")]
    public DiscordChannelData Thread { get; set; }
    Property Value
    Type Description
    DiscordChannelData
    | Improve this Doc View Source

    Timestamp

    When this message was sent.

    Declaration
    [JsonPropertyName("timestamp")]
    public DateTimeOffset Timestamp { get; set; }
    Property Value
    Type Description
    DateTimeOffset
    | Improve this Doc View Source

    Type

    Type of message.

    Declaration
    [JsonPropertyName("type")]
    public DiscordMessageType Type { get; set; }
    Property Value
    Type Description
    DiscordMessageType
    | Improve this Doc View Source

    WebhookId

    If the message is generated by a webhook, this is the webhook's id.

    Declaration
    [JsonPropertyName("webhook_id")]
    public ulong WebhookId { get; set; }
    Property Value
    Type Description
    System.UInt64

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX