Show / Hide Table of Contents

# Class SocketUserMessage

Represents a WebSocket-based message sent by a user.

##### Inheritance

System.Object
SocketEntity<System.UInt64>
SocketMessage
SocketUserMessage

##### Implements

IUserMessage
IMessage
ISnowflakeEntity
IEntity<System.UInt64>
IDeletable

##### Inherited Members

SocketMessage.Author
SocketMessage.Channel
SocketMessage.Source
SocketMessage.Content
SocketMessage.CreatedAt
SocketMessage.Activity
SocketMessage.Application
SocketMessage.Reference
SocketMessage.Reactions
SocketMessage.Timestamp
SocketMessage.DeleteAsync(RequestOptions)
SocketMessage.ToString()
SocketMessage.IMessage.Author
SocketMessage.IMessage.Channel
SocketMessage.IMessage.Type
SocketMessage.IMessage.Attachments
SocketMessage.IMessage.Embeds
SocketMessage.IMessage.MentionedChannelIds
SocketMessage.IMessage.MentionedRoleIds
SocketMessage.IMessage.MentionedUserIds
SocketMessage.AddReactionAsync(IEmote, RequestOptions)
SocketMessage.RemoveReactionAsync(IEmote, IUser, RequestOptions)
SocketMessage.RemoveReactionAsync(IEmote, UInt64, RequestOptions)
SocketMessage.RemoveAllReactionsAsync(RequestOptions)
SocketMessage.GetReactionUsersAsync(IEmote, Int32, RequestOptions)
SocketEntity<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.WebSocket

###### Assembly: Discord.Net.WebSocket.dll

##### Syntax

    public class SocketUserMessage : SocketMessage, IUserMessage, IMessage, ISnowflakeEntity, IEntity<ulong>, IDeletable

### Properties

| Improve this Doc View Source

#### Attachments

##### Declaration

    public override IReadOnlyCollection<Attachment> Attachments { get; }

##### Property Value

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

##### Overrides

SocketMessage.Attachments
| Improve this Doc View Source

#### EditedTimestamp

##### Declaration

    public override DateTimeOffset? EditedTimestamp { get; }

##### Property Value

Type | Description
--- | ---
System.Nullable<System.DateTimeOffset> |

##### Overrides

SocketMessage.EditedTimestamp
| Improve this Doc View Source

#### Embeds

##### Declaration

    public override IReadOnlyCollection<Embed> Embeds { get; }

##### Property Value

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

##### Overrides

SocketMessage.Embeds
| Improve this Doc View Source

#### IsPinned

##### Declaration

    public override bool IsPinned { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

##### Overrides

SocketMessage.IsPinned
| Improve this Doc View Source

#### IsSuppressed

##### Declaration

    public override bool IsSuppressed { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

##### Overrides

SocketMessage.IsSuppressed
| Improve this Doc View Source

#### IsTTS

##### Declaration

    public override bool IsTTS { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

##### Overrides

SocketMessage.IsTTS
| Improve this Doc View Source

#### MentionedChannels

##### Declaration

    public override IReadOnlyCollection<SocketGuildChannel> MentionedChannels { get; }

##### Property Value

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

##### Overrides

SocketMessage.MentionedChannels
| Improve this Doc View Source

#### MentionedRoles

##### Declaration

    public override IReadOnlyCollection<SocketRole> MentionedRoles { get; }

##### Property Value

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

##### Overrides

SocketMessage.MentionedRoles
| Improve this Doc View Source

#### MentionedUsers

##### Declaration

    public override IReadOnlyCollection<SocketUser> MentionedUsers { get; }

##### Property Value

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

##### Overrides

SocketMessage.MentionedUsers
| Improve this Doc View Source

#### Tags

##### Declaration

    public override IReadOnlyCollection<ITag> Tags { get; }

##### Property Value

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

##### Overrides

SocketMessage.Tags

### Methods

| Improve this Doc View Source

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

##### Declaration

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

##### Parameters

Type | Name | Description
--- | --- | ---
System.Action<MessageProperties> | func |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

##### Exceptions

Type | Condition
--- | ---
System.InvalidOperationException | Only the author of a message may modify the message.
System.ArgumentOutOfRangeException | Message content is too long, length must be less or equal to MaxMessageSize.

| Improve this Doc View Source

#### ModifySuppressionAsync(Boolean, RequestOptions)

##### Declaration

    public Task ModifySuppressionAsync(bool suppressEmbeds, RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | suppressEmbeds |
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

#### PinAsync(RequestOptions)

##### Declaration

    public Task PinAsync(RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

| Improve this Doc View Source

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

##### 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 |
TagHandling | channelHandling |
TagHandling | roleHandling |
TagHandling | everyoneHandling |
TagHandling | emojiHandling |

##### 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)

##### Declaration

    public Task UnpinAsync(RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

### Implements

IUserMessage
IMessage
ISnowflakeEntity
IEntity<TId>
IDeletable