Search Results for

    Show / Hide Table of Contents

    Interface IDiscordMessage

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

    Namespace: Color_Chan.Discord.Core.Common.Models.Message
    Assembly: Color-Chan.Discord.Core.dll
    Syntax
    public interface IDiscordMessage

    Properties

    | Improve this Doc View Source

    Activity

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

    Declaration
    IDiscordMessageActivity Activity { get; set; }
    Property Value
    Type Description
    IDiscordMessageActivity
    | Improve this Doc View Source

    Application

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

    Declaration
    IDiscordApplication Application { get; set; }
    Property Value
    Type Description
    IDiscordApplication
    | 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
    ulong? ApplicationId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.UInt64>
    | Improve this Doc View Source

    Attachments

    Any attached files.

    Declaration
    IEnumerable<IDiscordAttachment> Attachments { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IDiscordAttachment>
    | Improve this Doc View Source

    Author

    The author of this message.

    Declaration
    IDiscordUser Author { get; set; }
    Property Value
    Type Description
    IDiscordUser
    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
    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
    IEnumerable<IDiscordComponent> Components { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IDiscordComponent>
    | Improve this Doc View Source

    Content

    Contents of the message.

    Declaration
    string Content { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    EditedTimestamp

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

    Declaration
    DateTimeOffset? EditedTimestamp { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTimeOffset>
    | Improve this Doc View Source

    Embeds

    Any embedded content.

    Declaration
    IEnumerable<IDiscordEmbed> Embeds { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IDiscordEmbed>
    | Improve this Doc View Source

    Flags

    Message flags combined as a bitfield.

    Declaration
    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
    ulong? GuildId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.UInt64>
    | Improve this Doc View Source

    Id

    The Discord provided snowflake id.

    Declaration
    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
    IDiscordInteraction Interaction { get; set; }
    Property Value
    Type Description
    IDiscordInteraction
    | Improve this Doc View Source

    IsPinned

    Whether this message is pinned.

    Declaration
    bool IsPinned { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IsTts

    Whether this was a TTS message.

    Declaration
    bool IsTts { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Member

    Member properties for this message's author.

    Declaration
    IDiscordGuildMember Member { get; set; }
    Property Value
    Type Description
    IDiscordGuildMember
    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
    bool MentionEveryone { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Mentions

    Users specifically mentioned in the message.

    Declaration
    IEnumerable<IDiscordUser> Mentions { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IDiscordUser>
    | Improve this Doc View Source

    MentionsChannel

    Channels specifically mentioned in this message.

    Declaration
    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
    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
    string Nonce { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Reactions

    Reactions to the message.

    Declaration
    IEnumerable<IDiscordReaction> Reactions { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IDiscordReaction>
    | Improve this Doc View Source

    ReferencedMessage

    The message associated with ReferenceMessage.

    Declaration
    IDiscordMessage ReferencedMessage { get; set; }
    Property Value
    Type Description
    IDiscordMessage
    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
    IDiscordMessageReference ReferenceMessage { get; set; }
    Property Value
    Type Description
    IDiscordMessageReference
    | Improve this Doc View Source

    StickerItems

    Sent if the message contains stickers.

    Declaration
    IEnumerable<IDiscordMessageStickerItem> StickerItems { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IDiscordMessageStickerItem>
    Remarks

    Bots cannot send stickers.

    | Improve this Doc View Source

    Thread

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

    Declaration
    IDiscordChannel Thread { get; set; }
    Property Value
    Type Description
    IDiscordChannel
    | Improve this Doc View Source

    Timestamp

    When this message was sent.

    Declaration
    DateTimeOffset Timestamp { get; set; }
    Property Value
    Type Description
    System.DateTimeOffset
    | Improve this Doc View Source

    Type

    Type of message.

    Declaration
    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
    ulong WebhookId { get; set; }
    Property Value
    Type Description
    System.UInt64
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX