Refactor, rearrange, reimplement reactions; receive over gateway
This commit is contained in:
@@ -19,6 +19,11 @@ namespace Discord
|
||||
Name = name;
|
||||
}
|
||||
|
||||
internal static Emoji FromApi(API.Emoji emoji)
|
||||
{
|
||||
return new Emoji(emoji.Id, emoji.Name);
|
||||
}
|
||||
|
||||
public static Emoji Parse(string text)
|
||||
{
|
||||
Emoji result;
|
||||
|
||||
@@ -31,8 +31,6 @@ namespace Discord
|
||||
IReadOnlyCollection<IAttachment> Attachments { get; }
|
||||
/// <summary> Returns all embeds included in this message. </summary>
|
||||
IReadOnlyCollection<IEmbed> Embeds { get; }
|
||||
/// <summary> Returns all reactions included in this message. </summary>
|
||||
IReadOnlyCollection<IReaction> Reactions { get; }
|
||||
/// <summary> Returns all tags included in this message's content. </summary>
|
||||
IReadOnlyCollection<ITag> Tags { get; }
|
||||
/// <summary> Returns the ids of channels mentioned in this message. </summary>
|
||||
|
||||
@@ -7,6 +7,6 @@ namespace Discord
|
||||
{
|
||||
public interface IReaction
|
||||
{
|
||||
API.Emoji Emoji { get; }
|
||||
Emoji Emoji { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ namespace Discord
|
||||
/// <summary> Removes this message from its channel's pinned messages. </summary>
|
||||
Task UnpinAsync(RequestOptions options = null);
|
||||
|
||||
/// <summary> Returns all reactions included in this message. </summary>
|
||||
IReadOnlyDictionary<Emoji, int> Reactions { get; }
|
||||
|
||||
/// <summary> Adds a reaction to this message. </summary>
|
||||
Task AddReactionAsync(Emoji emoji, RequestOptions options = null);
|
||||
/// <summary> Adds a reaction to this message. </summary>
|
||||
|
||||
Reference in New Issue
Block a user