Interface IUserMessage
Represents a generic message sent by a user.
Assembly: Discord.Net.Core.dll​
View Source​
public interface IUserMessage : IMessage, ISnowflakeEntity, IEntity<ulong>, IDeletable
Properties​
ReferencedMessage​
Gets the referenced message if it is a crosspost, channel follow add, pin, or reply message.
View Source​
IUserMessage ReferencedMessage { get; }
Methods​
ModifyAsync(Action<MessageProperties>, RequestOptions)​
Modifies this message.
View Source​
Task ModifyAsync(Action<MessageProperties> func, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous modification operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Action<Discord.MessageProperties> | func | A delegate containing the properties to modify the message with. |
Discord.RequestOptions | options | The options to be used when sending the request. |
PinAsync(RequestOptions)​
Adds this message to its channel's pinned messages.
View Source​
Task PinAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous operation for pinning this message.
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
UnpinAsync(RequestOptions)​
Removes this message from its channel's pinned messages.
View Source​
Task UnpinAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous operation for unpinning this message.
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
CrosspostAsync(RequestOptions)​
Publishes (crossposts) this message.
View Source​
Task CrosspostAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous operation for publishing this message.
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
Resolve(TagHandling, TagHandling, TagHandling, TagHandling, TagHandling)​
Transforms this message's text into a human-readable form by resolving its tags.
View Source​
string Resolve(TagHandling userHandling = TagHandling.Name, TagHandling channelHandling = TagHandling.Name, TagHandling roleHandling = TagHandling.Name, TagHandling everyoneHandling = TagHandling.Ignore, TagHandling emojiHandling = TagHandling.Name)
Returns​
System.String
Parameters​
Type | Name | Description |
---|---|---|
Discord.TagHandling | userHandling | Determines how the user tag should be handled. |
Discord.TagHandling | channelHandling | Determines how the channel tag should be handled. |
Discord.TagHandling | roleHandling | Determines how the role tag should be handled. |
Discord.TagHandling | everyoneHandling | Determines how the @everyone tag should be handled. |
Discord.TagHandling | emojiHandling | Determines how the emoji tag should be handled. |
Extension Methods​
- Discord.IUserMessage.Discord.Commands.MessageExtensions.HasCharPrefix(System.Char,System.Int32@)
- Discord.IUserMessage.Discord.Commands.MessageExtensions.HasStringPrefix(System.String,System.Int32@,System.StringComparison)
- Discord.IUserMessage.Discord.Commands.MessageExtensions.HasMentionPrefix(Discord.IUser,System.Int32@)
- Discord.MessageExtensions.GetJumpUrl(Discord.IMessage)
- Discord.IUserMessage.Discord.MessageExtensions.AddReactionsAsync(Discord.IEmote[],Discord.RequestOptions)
- Discord.IUserMessage.Discord.MessageExtensions.RemoveReactionsAsync(Discord.IUser,Discord.IEmote[],Discord.RequestOptions)
- Discord.IUserMessage.Discord.MessageExtensions.ReplyAsync(System.String,System.Boolean,Discord.Embed,Discord.AllowedMentions,Discord.RequestOptions,Discord.MessageComponent,Discord.ISticker[],Discord.Embed[])