DiscordMessage

Namespace: Discord

Properties

Name

Description

Type

Id

ID of the message

ulong

Content

The message's text content

string

Tts

Whether this message should be TTS'd or not

bool

Author

Author of the message

MessageAuthor

Attachment

The message's attachment

Attachment

Embed

The message's embed

DiscordEmbed

Reactions

The message's current reactions

IReadOnlyList<MessageReaction>

Mentions

The users mentioned in the message

IReadOnlyList<DiscordUser>

MentionedRoles

The roles mentioned in the message

IReadOnlyList<ulong>

MentionedEveryone

Whether the message contains an @everyone ping or not

bool

Timestamp

Timestamp of when the message was sent

DateTime

EditedAt

Timestamp of when the message was last edited

DateTime?

Pinned

Whether this is a pinned message or not

bool

Channel

The channel containing this message

MinimalTextChannel

Guild

The guild this message was sent in (if any). This is only guaranteed to be set through the OnMessageReceived event.

MinimalGuild

Type

The type of message this is

MessageType

Methods

Edit

Edits the contents of the message.

Parameters

Name

Description

Type

message

The new contents of the message

string

Delete

Deletes the message.

GetReactions

Gets users who have reacted with a certain emoji.

Parameters

Name

Description

Type

reaction

The emoji you're querying for

string

limit

Max amount of reactions you want to receive. Max is 100.

uint?

afterId

Offset (in discord ID's) to start getting reactions from.

ulong?

Returns

A list of

DiscordUser

AddReaction

Adds a reaction to the message. This method follows Discord's message formatting rules.

Parameters

Name

Description

Type

reaction

The reaction you want to add.

string

RemoveReaction.

Removes a reaction from the message. This method follows Discord's message formatting rules.

Parameters

Name

Description

Type

reaction

The reaction you want to remove.

string

userId

In case you want to remove another user's reaction, specify it here.

ulong?

Last updated

Was this helpful?