summaryrefslogtreecommitdiff
path: root/discord/message.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-09-10 01:15:44 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2020-09-10 01:15:44 -0400
commitfc389441f81c8864a3539a7c47279f934cad4cc7 (patch)
tree0215bdadee5fe4210135ab00ac9de3fec8f53d13 /discord/message.hpp
parent6ae9cc915d8bba9415910f4c9745e1158a7e1f68 (diff)
downloadabaddon-portaudio-fc389441f81c8864a3539a7c47279f934cad4cc7.tar.gz
abaddon-portaudio-fc389441f81c8864a3539a7c47279f934cad4cc7.zip
deserialize message attachments for the future
Diffstat (limited to 'discord/message.hpp')
-rw-r--r--discord/message.hpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/discord/message.hpp b/discord/message.hpp
index e4f5b40..de312de 100644
--- a/discord/message.hpp
+++ b/discord/message.hpp
@@ -107,6 +107,18 @@ struct EmbedData {
friend void from_json(const nlohmann::json &j, EmbedData &m);
};
+struct AttachmentData {
+ Snowflake ID; //
+ std::string Filename; //
+ int Bytes; //
+ std::string URL; //
+ std::string ProxyURL; //
+ int Height = -1; // null
+ int Width = -1; // null
+
+ friend void from_json(const nlohmann::json &j, AttachmentData &m);
+};
+
struct Message {
Snowflake ID; //
Snowflake ChannelID; //
@@ -121,8 +133,8 @@ struct Message {
std::vector<User> Mentions; //
// std::vector<Role> MentionRoles; //
// std::vector<ChannelMentionData> MentionChannels; // opt
- // std::vector<AttachmentData> Attachments; //
- std::vector<EmbedData> Embeds; //
+ std::vector<AttachmentData> Attachments; //
+ std::vector<EmbedData> Embeds; //
// std::vector<ReactionData> Reactions; // opt
std::string Nonce; // opt
bool IsPinned; //