Class SocketMessage
Represents a WebSocket-based message.
Inherited Members
Namespace: Kook.WebSocket
Assembly: Kook.Net.WebSocket.dll
Syntax
public abstract class SocketMessage : SocketEntity<Guid>, IEntity<Guid>, IMessage, IEntity<Guid>, IDeletable, IUpdateable
Properties
Attachments
Gets the attachment included in this message.
Declaration
public virtual IReadOnlyCollection<Attachment> Attachments { get; }
Property Value
IReadOnlyCollection<Attachment>
|
Author
Gets the author of this message.
Declaration
public SocketUser Author { get; }
Property Value
SocketUser
A WebSocket-based user object. |
Cards
Returns all cards included in this message.
Declaration
public virtual IReadOnlyCollection<ICard> Cards { get; }
Property Value
IReadOnlyCollection<ICard>
Collection of card objects. |
Channel
Gets the source channel of the message.
Declaration
public ISocketMessageChannel Channel { get; }
Property Value
ISocketMessageChannel
A WebSocket-based message channel. |
CleanContent
Content
EditedTimestamp
Embeds
Returns all embeds included in this message.
Declaration
public virtual IReadOnlyCollection<IEmbed> Embeds { get; }
Property Value
IReadOnlyCollection<IEmbed>
Collection of embed objects. |
IsPinned
MentionedEveryone
MentionedHere
MentionedRoles
Returns the roles mentioned in this message.
Declaration
public virtual IReadOnlyCollection<SocketRole> MentionedRoles { get; }
Property Value
IReadOnlyCollection<SocketRole>
Collection of WebSocket-based roles. |
MentionedUsers
Returns the users mentioned in this message.
Declaration
public IReadOnlyCollection<SocketUser> MentionedUsers { get; }
Property Value
IReadOnlyCollection<SocketUser>
Collection of WebSocket-based users. |
Pokes
Gets a collection of the SocketPokeAction's on the message.
Declaration
public virtual IReadOnlyCollection<SocketPokeAction> Pokes { get; }
Property Value
IReadOnlyCollection<SocketPokeAction>
Collection of poke action objects. |
RawContent
Gets the raw content of the message.
Declaration
public string RawContent { get; }
Property Value
String
|
Remarks
This property is only available for messages that were received from the gateway.
Reactions
Declaration
public IReadOnlyDictionary<IEmote, ReactionMetadata> Reactions { get; }
Property Value
IReadOnlyDictionary<IEmote, ReactionMetadata>
|
Source
Gets the source type of this message.
Declaration
public MessageSource Source { get; }
Property Value
MessageSource
|
Implements
Tags
Declaration
public virtual IReadOnlyCollection<ITag> Tags { get; }
Property Value
IReadOnlyCollection<ITag>
|
Timestamp
Declaration
public DateTimeOffset Timestamp { get; }
Property Value
DateTimeOffset
|
Type
Gets the type of this message.
Declaration
public MessageType Type { get; }
Property Value
MessageType
|
Implements
Methods
AddReactionAsync(IEmote, RequestOptions)
Declaration
public Task AddReactionAsync(IEmote emote, RequestOptions options = null)
Parameters
IEmote
emote
|
RequestOptions
options
|
Returns
Task
|
DeleteAsync(RequestOptions)
Declaration
public Task DeleteAsync(RequestOptions options = null)
Parameters
RequestOptions
options
|
Returns
Task
|
GetReactionUsersAsync(IEmote, RequestOptions)
Declaration
public Task<IReadOnlyCollection<IUser>> GetReactionUsersAsync(IEmote emote, RequestOptions options = null)
Parameters
IEmote
emote
|
RequestOptions
options
|
Returns
Task<IReadOnlyCollection<IUser>>
|
RemoveReactionAsync(IEmote, IUser, RequestOptions)
Declaration
public Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null)
Parameters
IEmote
emote
|
IUser
user
|
RequestOptions
options
|
Returns
Task
|
RemoveReactionAsync(IEmote, UInt64, RequestOptions)
Declaration
public Task RemoveReactionAsync(IEmote emote, ulong userId, RequestOptions options = null)
Parameters
IEmote
emote
|
UInt64
userId
|
RequestOptions
options
|
Returns
Task
|
ToString()
Gets the content of the message.
Declaration
public override string ToString()
Returns
String
Content of the message. |
UpdateAsync(RequestOptions)
Declaration
public Task UpdateAsync(RequestOptions options = null)
Parameters
RequestOptions
options
|
Returns
Task
|
Explicit Interface Implementations
IMessage.Author
Gets the author of this message.
Declaration
IUser IMessage.Author { get; }
Returns
IUser
|
Implements
IMessage.Channel
Gets the source channel of the message.
Declaration
IMessageChannel IMessage.Channel { get; }
Returns
IMessageChannel
|