Show / Hide Table of Contents

# Class RestUserMessage

Represents a REST-based message sent by a user.

##### Inheritance

System.Object
RestEntity<System.UInt64>
RestMessage
RestUserMessage

##### Implements

IUpdateable
IUserMessage
IMessage
ISnowflakeEntity
IEntity<System.UInt64>
IDeletable

##### Inherited Members

RestMessage.Channel
RestMessage.Author
RestMessage.Source
RestMessage.Content
RestMessage.CreatedAt
RestMessage.Timestamp
RestMessage.Activity
RestMessage.Application
RestMessage.Reference
RestMessage.UpdateAsync(RequestOptions)
RestMessage.DeleteAsync(RequestOptions)
RestMessage.ToString()
RestMessage.IMessage.Type
RestMessage.IMessage.Author
RestMessage.IMessage.Attachments
RestMessage.IMessage.Embeds
RestMessage.IMessage.MentionedUserIds
RestMessage.Reactions
RestMessage.AddReactionAsync(IEmote, RequestOptions)
RestMessage.RemoveReactionAsync(IEmote, IUser, RequestOptions)
RestMessage.RemoveReactionAsync(IEmote, UInt64, RequestOptions)
RestMessage.RemoveAllReactionsAsync(RequestOptions)
RestMessage.GetReactionUsersAsync(IEmote, Int32, RequestOptions)
RestEntity<UInt64>.Id
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Discord.Rest

###### Assembly: Discord.Net.Rest.dll

##### Syntax

    public class RestUserMessage : RestMessage, IUpdateable, IUserMessage, IMessage, ISnowflakeEntity, IEntity<ulong>, IDeletable

### Properties

| Improve this Doc View Source

#### Attachments

Gets a collection of the Attachment's on the message.

##### Declaration

    public override IReadOnlyCollection<Attachment> Attachments { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.IReadOnlyCollection<Attachment> |

##### Overrides

RestMessage.Attachments
| Improve this Doc View Source

#### EditedTimestamp

Gets the time of this message's last edit.

##### Declaration

    public override DateTimeOffset? EditedTimestamp { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.DateTimeOffset> | Time of when the message was last edited; `null` if the message is never edited.

##### Overrides

RestMessage.EditedTimestamp
| Improve this Doc View Source

#### Embeds

Gets a collection of the Embed's on the message.

##### Declaration

    public override IReadOnlyCollection<Embed> Embeds { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.IReadOnlyCollection<Embed> |

##### Overrides

RestMessage.Embeds
| Improve this Doc View Source

#### IsPinned

Gets the value that indicates whether this message is pinned.

##### Declaration

    public override bool IsPinned { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean | `true` if this message was added to its channel's pinned messages; otherwise `false`.

##### Overrides

RestMessage.IsPinned
| Improve this Doc View Source

#### IsSuppressed

Gets the value that indicates whether or not this message's embeds are suppressed.

##### Declaration

    public override bool IsSuppressed { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean | `true` if the embeds in this message have been suppressed (made invisible); otherwise `false`.

##### Overrides

RestMessage.IsSuppressed
| Improve this Doc View Source

#### IsTTS

Gets the value that indicates whether this message was meant to be read-aloud by Discord.

##### Declaration

    public override bool IsTTS { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean | `true` if this message was sent as a text-to-speech message; otherwise `false`.

##### Overrides

RestMessage.IsTTS
| Improve this Doc View Source

#### MentionedChannelIds

Gets the IDs of channels mentioned in this message.

##### Declaration

    public override IReadOnlyCollection<ulong> MentionedChannelIds { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.IReadOnlyCollection<System.UInt64> | A read-only collection of channel IDs.

##### Overrides

RestMessage.MentionedChannelIds
| Improve this Doc View Source

#### MentionedRoleIds

Gets the IDs of roles mentioned in this message.

##### Declaration

    public override IReadOnlyCollection<ulong> MentionedRoleIds { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.IReadOnlyCollection<System.UInt64> | A read-only collection of role IDs.

##### Overrides

RestMessage.MentionedRoleIds
| Improve this Doc View Source

#### MentionedUsers

Gets a collection of the mentioned users in the message.

##### Declaration

    public override IReadOnlyCollection<RestUser> MentionedUsers { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.IReadOnlyCollection<RestUser> |

##### Overrides

RestMessage.MentionedUsers
| Improve this Doc View Source

#### Tags

Gets all tags included in this message's content.

##### Declaration

    public override IReadOnlyCollection<ITag> Tags { get; }

##### Property Value

Type | Description
--- | ---
System.Collections.Generic.IReadOnlyCollection<ITag> |

##### Overrides

RestMessage.Tags

### Methods

| Improve this Doc View Source

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

Modifies this message.

##### Declaration

    public 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.

| Improve this Doc View Source

#### ModifySuppressionAsync(Boolean, RequestOptions)

Modifies the suppression of this message.

##### Declaration

    public 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

    public 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

    public 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

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

##### Declaration

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

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | startIndex |
TagHandling | userHandling |
TagHandling | channelHandling |
TagHandling | roleHandling |
TagHandling | everyoneHandling |
TagHandling | emojiHandling |

##### Returns

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

| Improve this Doc View Source

#### UnpinAsync(RequestOptions)

Removes this message from its channel's pinned messages.

##### Declaration

    public 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.

### Implements

IUpdateable
IUserMessage
IMessage
ISnowflakeEntity
IEntity<TId>
IDeletable