summaryrefslogtreecommitdiff
path: root/discord/message.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-12-15 01:51:49 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2020-12-15 01:51:49 -0500
commit2667a4b30dd346f70aa8ca1ee7994c559be6d2bb (patch)
tree0ff7113d5c30e465e83a330fc1f19bd803bcc68d /discord/message.hpp
parent0c313ce5e8e849bcbaf23fcdf86f31ea38475d0e (diff)
downloadabaddon-portaudio-2667a4b30dd346f70aa8ca1ee7994c559be6d2bb.tar.gz
abaddon-portaudio-2667a4b30dd346f70aa8ca1ee7994c559be6d2bb.zip
display reactions + click to add/remove
Diffstat (limited to 'discord/message.hpp')
-rw-r--r--discord/message.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/discord/message.hpp b/discord/message.hpp
index 99c58ab..4de9235 100644
--- a/discord/message.hpp
+++ b/discord/message.hpp
@@ -3,6 +3,7 @@
#include "json.hpp"
#include "user.hpp"
#include "sticker.hpp"
+#include "emoji.hpp"
#include <string>
#include <vector>
@@ -140,6 +141,15 @@ struct MessageReferenceData {
friend void to_json(nlohmann::json &j, const MessageReferenceData &m);
};
+struct ReactionData {
+ int Count;
+ bool HasReactedWith;
+ Emoji Emoji;
+
+ friend void from_json(const nlohmann::json &j, ReactionData &m);
+ friend void to_json(nlohmann::json &j, const ReactionData &m);
+};
+
struct Message {
Snowflake ID;
Snowflake ChannelID;
@@ -156,7 +166,7 @@ struct Message {
// std::optional<std::vector<ChannelMentionData>> MentionChannels;
std::vector<AttachmentData> Attachments;
std::vector<EmbedData> Embeds;
- // std::optional<std::vector<ReactionData>> Reactions;
+ std::optional<std::vector<ReactionData>> Reactions;
std::optional<std::string> Nonce;
bool IsPinned;
std::optional<Snowflake> WebhookID;