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 SourceActivity
The activity data, Sent with Rich Presence-related chat embeds.
Declaration
IDiscordMessageActivity Activity { get; set; }
Property Value
Type | Description |
---|---|
IDiscordMessageActivity |
Application
The application data, sent with Rich Presence-related chat embeds.
Declaration
IDiscordApplication Application { get; set; }
Property Value
Type | Description |
---|---|
IDiscordApplication |
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> |
Attachments
Any attached files.
Declaration
IEnumerable<IDiscordAttachment> Attachments { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IDiscordAttachment> |
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.
ChannelId
Id of the channel the message was sent in.
Declaration
ulong? ChannelId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt64> |
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> |
Content
Contents of the message.
Declaration
string Content { get; set; }
Property Value
Type | Description |
---|---|
String |
EditedTimestamp
When this message was edited (or null if never).
Declaration
DateTimeOffset? EditedTimestamp { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<DateTimeOffset> |
Embeds
Any embedded content.
Declaration
IEnumerable<IDiscordEmbed> Embeds { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IDiscordEmbed> |
Flags
Message flags combined as a bitfield.
Declaration
DiscordMessageFlags? Flags { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<DiscordMessageFlags> |
GuildId
Id of the guild the message was sent in.
Declaration
ulong? GuildId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.UInt64> |
Id
The Discord provided snowflake id.
Declaration
ulong Id { get; set; }
Property Value
Type | Description |
---|---|
System.UInt64 |
Interaction
Sent if the message is a response to an Interaction.
Declaration
IDiscordInteraction Interaction { get; set; }
Property Value
Type | Description |
---|---|
IDiscordInteraction |
IsPinned
Whether this message is pinned.
Declaration
bool IsPinned { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IsTts
Whether this was a TTS message.
Declaration
bool IsTts { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
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.
MentionEveryone
Whether this message mentions everyone.
Declaration
bool MentionEveryone { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Mentions
Users specifically mentioned in the message.
Declaration
IEnumerable<IDiscordUser> Mentions { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IDiscordUser> |
MentionsChannel
Channels specifically mentioned in this message.
Declaration
IEnumerable<ulong> MentionsChannel { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.UInt64> |
MentionsRoles
Roles specifically mentioned in this message.
Declaration
IEnumerable<ulong> MentionsRoles { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.UInt64> |
Nonce
Used for validating a message was sent.
Declaration
string Nonce { get; set; }
Property Value
Type | Description |
---|---|
String |
Reactions
Reactions to the message.
Declaration
IEnumerable<IDiscordReaction> Reactions { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IDiscordReaction> |
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.
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 |
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.
Thread
The thread that was started from this message, includes thread member object.
Declaration
IDiscordChannel Thread { get; set; }
Property Value
Type | Description |
---|---|
IDiscordChannel |
Timestamp
When this message was sent.
Declaration
DateTimeOffset Timestamp { get; set; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
Type
Type of message.
Declaration
DiscordMessageType Type { get; set; }
Property Value
Type | Description |
---|---|
DiscordMessageType |
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 |