Class DiscordMessage
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
Represents a Discord text message.
public class DiscordMessage : SnowflakeObject
- Inheritance
-
objectDiscordMessage
- Inherited Members
- Extension Methods
Properties
- Activity
Gets the message activity in the Rich Presence embed.
- Application
Gets the message application in the Rich Presence embed.
- ApplicationId
Gets the id of the interaction application, if a response to an interaction.
- 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.
- ComponentActionRows
Gets the action rows this message was sent with - components holding buttons, selects and the likes.
- 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.
- Flags
Gets the bitwise flags for this message.
- Interaction
Gets whether 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 object for the referenced message
- MessageType
Gets the type of the message.
- Pinned
Gets whether the message is pinned.
- Poll
Gets the poll object for the message.
- Reactions
Gets reactions used on this message.
- Reference
Gets the original message reference from the crossposted message.
- ReferencedMessage
Gets the message object for the referenced message
- Stickers
Gets stickers for this message.
- 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
- CreateReactionAsync(DiscordEmoji)
Creates a reaction to this message.
- CreateThreadAsync(string, DiscordAutoArchiveDuration, string?)
Creates a new thread within this channel from this message.
- 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()
Immediately ends the poll. You cannot end polls from other users.
- Equals(DiscordMessage?)
Checks whether this DiscordMessage is equal to another DiscordMessage.
- Equals(object?)
Checks whether this DiscordMessage is equal to another object.
- FilterComponents<T>()
Searches the components on this message for an aggregate of all components of a certain type.
- ForwardAsync(DiscordChannel)
Forwards a message to the specified channel.
- ForwardAsync(ulong)
Forwards a message to the specified channel.
- GetAllPollAnswerVotersAsync(int, CancellationToken)
Retrieves a full list of users that voted a specified answer on a poll. This will execute one API request per 100 entities.
- GetHashCode()
Gets the hash code for this DiscordMessage.
- GetReactionsAsync(DiscordEmoji, CancellationToken)
Gets users that reacted with this emoji.
- ModifyAsync(DiscordMessageBuilder, bool, IEnumerable<DiscordAttachment>?)
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>, bool, IEnumerable<DiscordAttachment>?)
Edits the message.
- ModifyEmbedSuppressionAsync(bool)
Modifies the visibility of embeds in this message.
- 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.