diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-09-30 00:12:38 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2020-09-30 00:12:38 -0400 |
commit | 4ac27e91403b708088451c9c07f3b4c2eecb7cf2 (patch) | |
tree | 76c2256ae1786c9c25ee71169bcb5877b5089c2b /discord | |
parent | 1460d891409b019de2a8702b9036c8d2ed602765 (diff) | |
download | abaddon-portaudio-4ac27e91403b708088451c9c07f3b4c2eecb7cf2.tar.gz abaddon-portaudio-4ac27e91403b708088451c9c07f3b4c2eecb7cf2.zip |
add wonky image loading
Diffstat (limited to 'discord')
-rw-r--r-- | discord/message.cpp | 6 | ||||
-rw-r--r-- | discord/message.hpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/discord/message.cpp b/discord/message.cpp index 29f3dd2..428281d 100644 --- a/discord/message.cpp +++ b/discord/message.cpp @@ -66,8 +66,8 @@ void from_json(const nlohmann::json &j, AttachmentData &m) { JS_D("size", m.Bytes); JS_D("url", m.URL); JS_D("proxy_url", m.ProxyURL); - JS_N("height", m.Height); - JS_N("width", m.Width); + JS_ON("height", m.Height); + JS_ON("width", m.Width); } void from_json(const nlohmann::json &j, Message &m) { @@ -86,7 +86,7 @@ void from_json(const nlohmann::json &j, Message &m) { JS_D("mentions", m.Mentions); // JS_D("mention_roles", m.MentionRoles); // JS_O("mention_channels", m.MentionChannels); - // JS_D("attachments", m.Attachments); + JS_D("attachments", m.Attachments); JS_D("embeds", m.Embeds); // JS_O("reactions", m.Reactions); JS_O("nonce", m.Nonce); diff --git a/discord/message.hpp b/discord/message.hpp index d288cda..a609742 100644 --- a/discord/message.hpp +++ b/discord/message.hpp @@ -113,8 +113,8 @@ struct AttachmentData { int Bytes; // std::string URL; // std::string ProxyURL; // - int Height = -1; // null - int Width = -1; // null + int Height = -1; // opt, null + int Width = -1; // opt, null friend void from_json(const nlohmann::json &j, AttachmentData &m); }; |