Interface IMessage
- Namespace
- Kook
- Assembly
- Kook.Net.Core.dll
Represents a message object.
public interface IMessage : IEntity<Guid>, IDeletable
- Inherited Members
- Extension Methods
Properties
Attachments
Gets the attachment included in this message.
IReadOnlyCollection<IAttachment> Attachments { get; }
Property Value
- IReadOnlyCollection<IAttachment>
The attachment included in this message;
Author
Gets the author of this message.
IUser Author { get; }
Property Value
Cards
Gets all cards included in this message.
IReadOnlyCollection<ICard> Cards { get; }
Property Value
- IReadOnlyCollection<ICard>
A read-only collection of card objects.
Channel
Gets the source channel of the message.
IMessageChannel Channel { get; }
Property Value
CleanContent
Gets the clean content for this message.
string CleanContent { get; }
Property Value
- string
A string that contains the body of the message stripped of mentions, markdown, emojis and pings; note that this field may be empty or the original code if the message is not a text based message.
Content
Gets the content for this message.
string Content { get; }
Property Value
- string
A string that contains the body of the message; note that this field may be empty or the original code if the message is not a text based message.
EditedTimestamp
Gets the time of this message's last edit.
DateTimeOffset? EditedTimestamp { get; }
Property Value
- DateTimeOffset?
Time of when the message was last edited;
null
if the message is never edited.
Embeds
Gets all embeds included in this message.
IReadOnlyCollection<IEmbed> Embeds { get; }
Property Value
- IReadOnlyCollection<IEmbed>
A read-only collection of embed objects.
IsPinned
Gets the value that indicates whether this message is pinned.
bool? IsPinned { get; }
Property Value
- bool?
true
if this message was added to its channel's pinned messages; otherwisefalse
.
MentionedEveryone
Gets the value that indicates whether this message mentioned everyone.
bool MentionedEveryone { get; }
Property Value
- bool
true
if this message mentioned everyone; otherwisefalse
.
MentionedHere
Gets the value that indicates whether this message mentioned online users.
bool MentionedHere { get; }
Property Value
- bool
true
if this message mentioned online users; otherwisefalse
.
MentionedRoleIds
Gets the IDs of roles mentioned in this message.
IReadOnlyCollection<uint> MentionedRoleIds { get; }
Property Value
- IReadOnlyCollection<uint>
A read-only collection of role IDs.
MentionedUserIds
Gets the IDs of users mentioned in this message.
IReadOnlyCollection<ulong> MentionedUserIds { get; }
Property Value
- IReadOnlyCollection<ulong>
A read-only collection of user IDs.
Pokes
Gets all poke actions included in this message.
IReadOnlyCollection<IPokeAction> Pokes { get; }
Property Value
- IReadOnlyCollection<IPokeAction>
A read-only collection of poke actions objects.
Reactions
Gets all reactions included in this message.
IReadOnlyDictionary<IEmote, ReactionMetadata> Reactions { get; }
Property Value
Source
Gets the source type of this message.
MessageSource Source { get; }
Property Value
Tags
Gets all tags included in this message's content.
IReadOnlyCollection<ITag> Tags { get; }
Property Value
Timestamp
Gets the time this message was sent.
DateTimeOffset Timestamp { get; }
Property Value
- DateTimeOffset
Time of when the message was sent.
Type
Gets the type of this message.
MessageType Type { get; }
Property Value
Methods
AddReactionAsync(IEmote, RequestOptions?)
Adds a reaction to this message.
Task AddReactionAsync(IEmote emote, RequestOptions? options = null)
Parameters
emote
IEmoteThe emoji used to react to this message.
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous operation for adding a reaction to this message.
- See Also
GetReactionUsersAsync(IEmote, RequestOptions?)
Gets all users that reacted to a message with a given emote.
Task<IReadOnlyCollection<IUser>> GetReactionUsersAsync(IEmote emote, RequestOptions? options = null)
Parameters
emote
IEmoteThe emoji that represents the reaction that you wish to get.
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task<IReadOnlyCollection<IUser>>
Collection of users.
RemoveReactionAsync(IEmote, IUser, RequestOptions?)
Removes a reaction from message.
Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions? options = null)
Parameters
emote
IEmoteThe emoji used to react to this message.
user
IUserThe user that added the emoji.
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous operation for removing a reaction to this message.
- See Also
RemoveReactionAsync(IEmote, ulong, RequestOptions?)
Removes a reaction from message.
Task RemoveReactionAsync(IEmote emote, ulong userId, RequestOptions? options = null)
Parameters
emote
IEmoteThe emoji used to react to this message.
userId
ulongThe ID of the user that added the emoji.
options
RequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous operation for removing a reaction to this message.
- See Also