Show / Hide Table of Contents

Class SocketMessage

Represents a WebSocket-based message.

Inheritance
System.Object
SocketEntity<System.UInt64>
SocketMessage
SocketSystemMessage
SocketUserMessage
Implements
IMessage
ISnowflakeEntity
IEntity<System.UInt64>
IDeletable
Inherited Members
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 abstract class SocketMessage : SocketEntity<ulong>, IMessage, ISnowflakeEntity, IEntity<ulong>, IDeletable

Properties

| Improve this Doc View Source

Activity

Declaration
public MessageActivity Activity { get; }
Property Value
Type Description
MessageActivity
| Improve this Doc View Source

Application

Declaration
public MessageApplication Application { get; }
Property Value
Type Description
MessageApplication
| Improve this Doc View Source

Attachments

Returns all attachments included in this message.

Declaration
public virtual IReadOnlyCollection<Attachment> Attachments { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<Attachment>

Collection of attachments.

| Improve this Doc View Source

Author

Gets the author of this message.

Declaration
public SocketUser Author { get; }
Property Value
Type Description
SocketUser

A WebSocket-based user object.

| Improve this Doc View Source

Channel

Gets the source channel of the message.

Declaration
public ISocketMessageChannel Channel { get; }
Property Value
Type Description
ISocketMessageChannel

A WebSocket-based message channel.

| Improve this Doc View Source

Content

Declaration
public string Content { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

CreatedAt

Declaration
public DateTimeOffset CreatedAt { get; }
Property Value
Type Description
System.DateTimeOffset
| Improve this Doc View Source

EditedTimestamp

Declaration
public virtual DateTimeOffset? EditedTimestamp { get; }
Property Value
Type Description
System.Nullable<System.DateTimeOffset>
| Improve this Doc View Source

Embeds

Returns all embeds included in this message.

Declaration
public virtual IReadOnlyCollection<Embed> Embeds { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<Embed>

Collection of embed objects.

| Improve this Doc View Source

IsPinned

Declaration
public virtual bool IsPinned { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsSuppressed

Declaration
public virtual bool IsSuppressed { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsTTS

Declaration
public virtual bool IsTTS { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

MentionedChannels

Returns the channels mentioned in this message.

Declaration
public virtual IReadOnlyCollection<SocketGuildChannel> MentionedChannels { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<SocketGuildChannel>

Collection of WebSocket-based guild channels.

| Improve this Doc View Source

MentionedRoles

Returns the roles mentioned in this message.

Declaration
public virtual IReadOnlyCollection<SocketRole> MentionedRoles { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<SocketRole>

Collection of WebSocket-based roles.

| Improve this Doc View Source

MentionedUsers

Returns the users mentioned in this message.

Declaration
public virtual IReadOnlyCollection<SocketUser> MentionedUsers { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<SocketUser>

Collection of WebSocket-based users.

| Improve this Doc View Source

Reactions

Declaration
public IReadOnlyDictionary<IEmote, ReactionMetadata> Reactions { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyDictionary<IEmote, ReactionMetadata>
| Improve this Doc View Source

Reference

Declaration
public MessageReference Reference { get; }
Property Value
Type Description
MessageReference
| Improve this Doc View Source

Source

Declaration
public MessageSource Source { get; }
Property Value
Type Description
MessageSource
| Improve this Doc View Source

Tags

Declaration
public virtual IReadOnlyCollection<ITag> Tags { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<ITag>
| Improve this Doc View Source

Timestamp

Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type Description
System.DateTimeOffset

Methods

| Improve this Doc View Source

AddReactionAsync(IEmote, RequestOptions)

Declaration
public Task AddReactionAsync(IEmote emote, RequestOptions options = null)
Parameters
Type Name Description
IEmote emote
RequestOptions options
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

DeleteAsync(RequestOptions)

Declaration
public Task DeleteAsync(RequestOptions options = null)
Parameters
Type Name Description
RequestOptions options
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

GetReactionUsersAsync(IEmote, Int32, RequestOptions)

Declaration
public IAsyncEnumerable<IReadOnlyCollection<IUser>> GetReactionUsersAsync(IEmote emote, int limit, RequestOptions options = null)
Parameters
Type Name Description
IEmote emote
System.Int32 limit
RequestOptions options
Returns
Type Description
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<IUser>>
| Improve this Doc View Source

RemoveAllReactionsAsync(RequestOptions)

Declaration
public Task RemoveAllReactionsAsync(RequestOptions options = null)
Parameters
Type Name Description
RequestOptions options
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

RemoveReactionAsync(IEmote, IUser, RequestOptions)

Declaration
public Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null)
Parameters
Type Name Description
IEmote emote
IUser user
RequestOptions options
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

RemoveReactionAsync(IEmote, UInt64, RequestOptions)

Declaration
public Task RemoveReactionAsync(IEmote emote, ulong userId, RequestOptions options = null)
Parameters
Type Name Description
IEmote emote
System.UInt64 userId
RequestOptions options
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

ToString()

Gets the content of the message.

Declaration
public override string ToString()
Returns
Type Description
System.String

Content of the message.

Overrides
System.Object.ToString()

Explicit Interface Implementations

| Improve this Doc View Source

IMessage.Attachments

Declaration
IReadOnlyCollection<IAttachment> IMessage.Attachments { get; }
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<IAttachment>
| Improve this Doc View Source

IMessage.Author

Declaration
IUser IMessage.Author { get; }
Returns
Type Description
IUser
| Improve this Doc View Source

IMessage.Channel

Declaration
IMessageChannel IMessage.Channel { get; }
Returns
Type Description
IMessageChannel
| Improve this Doc View Source

IMessage.Embeds

Declaration
IReadOnlyCollection<IEmbed> IMessage.Embeds { get; }
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<IEmbed>
| Improve this Doc View Source

IMessage.MentionedChannelIds

Declaration
IReadOnlyCollection<ulong> IMessage.MentionedChannelIds { get; }
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<System.UInt64>
| Improve this Doc View Source

IMessage.MentionedRoleIds

Declaration
IReadOnlyCollection<ulong> IMessage.MentionedRoleIds { get; }
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<System.UInt64>
| Improve this Doc View Source

IMessage.MentionedUserIds

Declaration
IReadOnlyCollection<ulong> IMessage.MentionedUserIds { get; }
Returns
Type Description
System.Collections.Generic.IReadOnlyCollection<System.UInt64>
| Improve this Doc View Source

IMessage.Type

Declaration
MessageType IMessage.Type { get; }
Returns
Type Description
MessageType

Implements

IMessage
ISnowflakeEntity
IEntity<TId>
IDeletable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX