summaryrefslogtreecommitdiff
path: root/discord/objects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'discord/objects.cpp')
-rw-r--r--discord/objects.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/discord/objects.cpp b/discord/objects.cpp
index ed556f4..1a8355e 100644
--- a/discord/objects.cpp
+++ b/discord/objects.cpp
@@ -295,6 +295,18 @@ void to_json(nlohmann::json &j, const CreateMessageObject &m) {
j["content"] = m.Content;
}
+void to_json(nlohmann::json &j, const MessageEditObject &m) {
+ if (m.Content.size() > 0)
+ j["content"] = m.Content;
+
+ // todo EmbedData to_json
+ // if (m.Embeds.size() > 0)
+ // j["embeds"] = m.Embeds;
+
+ if (m.Flags != -1)
+ j["flags"] = m.Flags;
+}
+
Snowflake::Snowflake()
: m_num(Invalid) {}