"""Support""" the 'reactions' field on message objects
this is all really broken
This commit is contained in:
@@ -36,5 +36,7 @@ namespace Discord.API
|
||||
public Optional<Embed[]> Embeds { get; set; }
|
||||
[JsonProperty("pinned")]
|
||||
public Optional<bool> Pinned { get; set; }
|
||||
[JsonProperty("reactions")]
|
||||
public Optional<Reaction[]> Reactions { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,17 +4,15 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API.Common
|
||||
namespace Discord.API
|
||||
{
|
||||
public class Reaction
|
||||
{
|
||||
[JsonProperty("user_id")]
|
||||
public ulong UserId { get; set; }
|
||||
[JsonProperty("message_id")]
|
||||
public ulong MessageId { get; set; }
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
[JsonProperty("me")]
|
||||
public bool Me { get; set; }
|
||||
[JsonProperty("emoji")]
|
||||
public Emoji Emoji { get; set; }
|
||||
[JsonProperty("channel_id")]
|
||||
public ulong ChannelId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ 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>
|
||||
|
||||
12
src/Discord.Net.Core/Entities/Messages/IReaction.cs
Normal file
12
src/Discord.Net.Core/Entities/Messages/IReaction.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
public interface IReaction
|
||||
{
|
||||
API.Emoji Emoji { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user