summaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
Diffstat (limited to 'discord')
-rw-r--r--discord/message.cpp6
-rw-r--r--discord/message.hpp4
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);
};