Class SocketMessage
Represents a WebSocket-based message.
Inheritance
SocketMessage
Assembly: Discord.Net.WebSocket.dll
Syntax
public abstract class SocketMessage : SocketEntity<ulong>, IEntity<ulong>, IMessage, ISnowflakeEntity, IEntity<ulong>, IDeletable
Properties
|
Improve this Doc
View Source
Activity
Gets the activity associated with a message.
Declaration
public MessageActivity Activity { get; }
Property Value
Type |
Description |
MessageActivity |
A message's activity, if any is associated.
|
|
Improve this Doc
View Source
Application
Gets the application associated with a message.
Declaration
public MessageApplication Application { get; }
Property Value
|
Improve this Doc
View Source
Attachments
Returns all attachments included in this message.
Declaration
public virtual IReadOnlyCollection<Attachment> Attachments { get; }
Property Value
Type |
Description |
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
|
Improve this Doc
View Source
CleanContent
Declaration
public string CleanContent { get; }
Property Value
|
Improve this Doc
View Source
Components
Declaration
public IReadOnlyCollection<ActionRowComponent> Components { get; }
Property Value
|
Improve this Doc
View Source
Content
Declaration
public string Content { get; }
Property Value
|
Improve this Doc
View Source
CreatedAt
Declaration
public DateTimeOffset CreatedAt { get; }
Property Value
Type |
Description |
DateTimeOffset |
|
|
Improve this Doc
View Source
EditedTimestamp
Declaration
public virtual DateTimeOffset? EditedTimestamp { get; }
Property Value
Type |
Description |
Nullable<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 |
IReadOnlyCollection<Embed> |
Collection of embed objects.
|
|
Improve this Doc
View Source
Flags
Declaration
public MessageFlags? Flags { get; }
Property Value
|
Improve this Doc
View Source
Interaction
Gets the interaction this message is a response to.
Declaration
public MessageInteraction<SocketUser> Interaction { get; }
Property Value
|
Improve this Doc
View Source
IsPinned
Declaration
public virtual bool IsPinned { get; }
Property Value
|
Improve this Doc
View Source
IsSuppressed
Declaration
public virtual bool IsSuppressed { get; }
Property Value
|
Improve this Doc
View Source
IsTTS
Declaration
public virtual bool IsTTS { get; }
Property Value
|
Improve this Doc
View Source
MentionedChannels
Returns the channels mentioned in this message.
Declaration
public virtual IReadOnlyCollection<SocketGuildChannel> MentionedChannels { get; }
Property Value
Type |
Description |
IReadOnlyCollection<SocketGuildChannel> |
Collection of WebSocket-based guild channels.
|
|
Improve this Doc
View Source
MentionedEveryone
Declaration
public virtual bool MentionedEveryone { get; }
Property Value
|
Improve this Doc
View Source
MentionedRoles
Returns the roles mentioned in this message.
Declaration
public virtual IReadOnlyCollection<SocketRole> MentionedRoles { get; }
Property Value
Type |
Description |
IReadOnlyCollection<SocketRole> |
Collection of WebSocket-based roles.
|
|
Improve this Doc
View Source
MentionedUsers
Returns the users mentioned in this message.
Declaration
public IReadOnlyCollection<SocketUser> MentionedUsers { get; }
Property Value
Type |
Description |
IReadOnlyCollection<SocketUser> |
Collection of WebSocket-based users.
|
|
Improve this Doc
View Source
Reactions
Declaration
public IReadOnlyDictionary<IEmote, ReactionMetadata> Reactions { get; }
Property Value
|
Improve this Doc
View Source
Reference
Gets the reference to the original message if it is a crosspost, channel follow add, pin, or reply message.
Declaration
public MessageReference Reference { get; }
Property Value
|
Improve this Doc
View Source
RoleSubscriptionData
Declaration
public MessageRoleSubscriptionData RoleSubscriptionData { get; }
Property Value
|
Improve this Doc
View Source
Source
Gets the source type of this message.
Declaration
public MessageSource Source { get; }
Property Value
|
Improve this Doc
View Source
Stickers
Declaration
public virtual IReadOnlyCollection<SocketSticker> Stickers { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public virtual IReadOnlyCollection<ITag> Tags { get; }
Property Value
Type |
Description |
IReadOnlyCollection<ITag> |
|
|
Improve this Doc
View Source
Thread
Gets the thread that was started from this message.
Declaration
public SocketThreadChannel Thread { get; }
Property Value
|
Improve this Doc
View Source
Timestamp
Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type |
Description |
DateTimeOffset |
|
|
Improve this Doc
View Source
Type
Gets the type of this message.
Declaration
public MessageType Type { get; }
Property Value
Methods
|
Improve this Doc
View Source
AddReactionAsync(IEmote, RequestOptions)
Declaration
public Task AddReactionAsync(IEmote emote, RequestOptions options = null)
Parameters
Returns
|
Improve this Doc
View Source
DeleteAsync(RequestOptions)
Declaration
public Task DeleteAsync(RequestOptions options = null)
Parameters
Returns
|
Improve this Doc
View Source
GetReactionUsersAsync(IEmote, Int32, RequestOptions)
Declaration
public IAsyncEnumerable<IReadOnlyCollection<IUser>> GetReactionUsersAsync(IEmote emote, int limit, RequestOptions options = null)
Parameters
Returns
Type |
Description |
IAsyncEnumerable<IReadOnlyCollection<IUser>> |
|
|
Improve this Doc
View Source
RemoveAllReactionsAsync(RequestOptions)
Declaration
public Task RemoveAllReactionsAsync(RequestOptions options = null)
Parameters
Returns
|
Improve this Doc
View Source
RemoveAllReactionsForEmoteAsync(IEmote, RequestOptions)
Declaration
public Task RemoveAllReactionsForEmoteAsync(IEmote emote, RequestOptions options = null)
Parameters
Returns
|
Improve this Doc
View Source
RemoveReactionAsync(IEmote, IUser, RequestOptions)
Declaration
public Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null)
Parameters
Returns
|
Improve this Doc
View Source
RemoveReactionAsync(IEmote, UInt64, RequestOptions)
Declaration
public Task RemoveReactionAsync(IEmote emote, ulong userId, RequestOptions options = null)
Parameters
Returns
|
Improve this Doc
View Source
ToString()
Gets the content of the message.
Declaration
public override string ToString()
Returns
Type |
Description |
String |
Content of the message.
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IMessage.Author
Gets the author of this message.
Declaration
IUser IMessage.Author { get; }
Returns
|
Improve this Doc
View Source
IMessage.Channel
Gets the source channel of the message.
Declaration
IMessageChannel IMessage.Channel { get; }
Returns
|
Improve this Doc
View Source
IMessage.Interaction
Gets the interaction this message is a response to.
Declaration
IMessageInteraction IMessage.Interaction { get; }
Returns
|
Improve this Doc
View Source
IMessage.Thread
Gets the thread that was started from this message.
Declaration
IThreadChannel IMessage.Thread { get; }
Returns
Implements