Table of Contents

Class DiscordMessage

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

Represents a Discord text message.

public class DiscordMessage : SnowflakeObject, IEquatable<DiscordMessage>
Inheritance
DiscordMessage
Implements
Inherited Members

Fields

MentionedRoleIds

Properties

Activity

Gets the message activity in the Rich Presence embed.

Application

Gets the message application in the Rich Presence embed.

ApplicationId

Gets the message application id in the Rich Presence embed.

Attachments

Gets files attached to this message.

Author

Gets the user or member that sent the message.

Channel

Gets the channel in which the message was sent.

ChannelId

Gets the ID of the channel in which the message was sent.

Components

Gets the components this message was sent with.

Content

Gets the message's content.

EditedTimestamp

Gets the message's edit timestamp. Will be null if the message was not edited.

Embeds

Gets embeds attached to this message.

EnforceNonce

Gets whether the Nonce is enforced to be validated.

Flags

Gets the bitwise flags for this message.

Guild

Gets the guild to which this channel belongs.

GuildId

Gets the guild id.

HasMessageReference

Gets whether this message has a message reference (reply, announcement, etc.).

HasMessageSnapshots

Gets whether this message has forwarded messages.

HasPoll

Gets whether this message has a poll.

Interaction

Gets whether the message is a response to an interaction.

InteractionMetadata

Gets the interaction metadata if the message is a response to an interaction.

IsEdited

Gets whether this message was edited.

IsTts

Gets whether the message is a text-to-speech message.

JumpLink

Gets the jump link to this message.

MentionEveryone

Gets whether the message mentions everyone.

MentionedChannels

Gets channels mentioned by this message.

MentionedRoles

Gets roles mentioned by this message.

MentionedUsers

Gets users or members mentioned by this message.

MessageSnapshots

Gets the message snapshots.

MessageType

Gets the type of the message.

Nonce

Gets the nonce sent with the message, if the message was sent by the client.

Pinned

Gets whether the message is pinned.

Poll

Gets the poll of the message if one was attached.

Position

Currently unknown.

Reactions

Gets reactions used on this message.

Reference

Gets the message reference.

ReferencedMessage

Gets the message object for the referenced message

Resolved

Gets the Discord snowflake objects resolved from this message's auto-populated select menus.

Stickers

Gets stickers for this message.

Thread

Gets the thread that was started from this message.

warning

If you're looking to get the actual thread channel this message was send in, call Channel and convert it to a DiscordThreadChannel.

Timestamp

Gets the message's creation timestamp.

WebhookId

Gets the id of the webhook that generated this message.

WebhookMessage

Gets whether the message originated from a webhook.

Methods

ClearAttachmentsAsync()

Clears all attachments from the message.

CreateReactionAsync(DiscordEmoji)

Creates a reaction to this message.

CreateThreadAsync(string, ThreadAutoArchiveDuration, int?, string?)

Creates a thread. Depending on the ChannelType of the parent channel it's either a PublicThread or a NewsThread.

DeleteAllReactionsAsync(string)

Deletes all reactions for this message.

DeleteAsync(string)

Deletes the message.

DeleteOwnReactionAsync(DiscordEmoji)

Deletes your own reaction

DeleteReactionAsync(DiscordEmoji, DiscordUser, string)

Deletes another user's reaction.

DeleteReactionsEmojiAsync(DiscordEmoji)

Deletes all reactions of a specific reaction for this message.

EndPollAsync()

Ends the poll on this message.

Works only for own polls and if they are not expired yet.

Equals(DiscordMessage)

Checks whether this DiscordMessage is equal to another DiscordMessage.

Equals(object)

Checks whether this DiscordMessage is equal to another object.

ForwardMessageAsync(DiscordChannel, string?)

Forwards this message to another channel.

GetHashCode()

Gets the hash code for this DiscordMessage.

GetReactionsAsync(DiscordEmoji, int, ulong?)

Gets users that reacted with this emoji.

ModifyAsync(DiscordMessageBuilder)

Edits the message.

ModifyAsync(Optional<DiscordEmbed>)

Edits the message.

ModifyAsync(Optional<string>)

Edits the message.

ModifyAsync(Optional<string>, Optional<DiscordEmbed>)

Edits the message.

ModifyAsync(Optional<string>, Optional<IEnumerable<DiscordEmbed>>)

Edits the message.

ModifyAsync(Action<DiscordMessageBuilder>)

Edits the message.

ModifySuppressionAsync(bool)

Edits the message embed suppression.

PinAsync()

Pins the message in its channel.

RespondAsync(DiscordEmbed)

Responds to the message. This produces a reply.

RespondAsync(DiscordMessageBuilder)

Responds to the message. This produces a reply.

RespondAsync(Action<DiscordMessageBuilder>)

Responds to the message. This produces a reply.

RespondAsync(string)

Responds to the message. This produces a reply.

RespondAsync(string, DiscordEmbed)

Responds to the message. This produces a reply.

ToString()

Returns a string representation of this message.

UnpinAsync()

Unpins the message in its channel.

Operators

operator ==(DiscordMessage, DiscordMessage)

Gets whether the two DiscordMessage objects are equal.

operator !=(DiscordMessage, DiscordMessage)

Gets whether the two DiscordMessage objects are not equal.