Show / Hide Table of Contents

# Interface IUserMessage

Represents a generic message sent by a user.

##### Inherited Members

IMessage.Type
IMessage.Source
IMessage.IsTTS
IMessage.IsPinned
IMessage.IsSuppressed
IMessage.Content
IMessage.Timestamp
IMessage.EditedTimestamp
IMessage.Channel
IMessage.Author
IMessage.Attachments
IMessage.Embeds
IMessage.Tags
IMessage.MentionedChannelIds
IMessage.MentionedRoleIds
IMessage.MentionedUserIds
IMessage.Activity
IMessage.Application
IMessage.Reference
IMessage.Reactions
IMessage.AddReactionAsync(IEmote, RequestOptions)
IMessage.RemoveReactionAsync(IEmote, IUser, RequestOptions)
IMessage.RemoveReactionAsync(IEmote, UInt64, RequestOptions)
IMessage.RemoveAllReactionsAsync(RequestOptions)
IMessage.GetReactionUsersAsync(IEmote, Int32, RequestOptions)
ISnowflakeEntity.CreatedAt
IEntity<UInt64>.Id
IDeletable.DeleteAsync(RequestOptions)

###### Namespace: Discord

###### Assembly: Discord.Net.Core.dll

##### Syntax

    public interface IUserMessage : IMessage, ISnowflakeEntity, IEntity<ulong>, IDeletable

### Methods

| Improve this Doc View Source

#### ModifyAsync(Action<MessageProperties>, RequestOptions)

Modifies this message.

##### Declaration

    Task ModifyAsync(Action<MessageProperties> func, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Action<MessageProperties> | func | A delegate containing the properties to modify the message with.
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task | A task that represents the asynchronous modification operation.

##### Remarks

This method modifies this message with the specified properties. To see an example of this method and what properties are available, please refer to MessageProperties.

##### Examples

The following example replaces the content of the message with `Hello World!`.

    await msg.ModifyAsync(x => x.Content = "Hello World!");

| Improve this Doc View Source

#### ModifySuppressionAsync(Boolean, RequestOptions)

Modifies the suppression of this message.

##### Declaration

    Task ModifySuppressionAsync(bool suppressEmbeds, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | suppressEmbeds | Whether or not embeds in this message should be suppressed.
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task | A task that represents the asynchronous modification operation.

##### Remarks

This method modifies whether or not embeds in this message are suppressed (hidden).

| Improve this Doc View Source

#### PinAsync(RequestOptions)

Adds this message to its channel's pinned messages.

##### Declaration

    Task PinAsync(RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task | A task that represents the asynchronous operation for pinning this message.

| Improve this Doc View Source

#### Resolve(TagHandling, TagHandling, TagHandling, TagHandling, TagHandling)

Transforms this message's text into a human-readable form by resolving its tags.

##### Declaration

    string Resolve(TagHandling userHandling = TagHandling.Name, TagHandling channelHandling = TagHandling.Name, TagHandling roleHandling = TagHandling.Name, TagHandling everyoneHandling = TagHandling.Ignore, TagHandling emojiHandling = TagHandling.Name)

##### Parameters

Type | Name | Description
--- | --- | ---
TagHandling | userHandling | Determines how the user tag should be handled.
TagHandling | channelHandling | Determines how the channel tag should be handled.
TagHandling | roleHandling | Determines how the role tag should be handled.
TagHandling | everyoneHandling | Determines how the @everyone tag should be handled.
TagHandling | emojiHandling | Determines how the emoji tag should be handled.

##### Returns

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### UnpinAsync(RequestOptions)

Removes this message from its channel's pinned messages.

##### Declaration

    Task UnpinAsync(RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestOptions | options | The options to be used when sending the request.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task | A task that represents the asynchronous operation for unpinning this message.

### Extension Methods

MessageExtensions.GetJumpUrl(IMessage)
MessageExtensions.AddReactionsAsync(IUserMessage, IEmote[], RequestOptions)
MessageExtensions.RemoveReactionsAsync(IUserMessage, IUser, IEmote[], RequestOptions)