summaryrefslogtreecommitdiff
path: root/discord/message.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'discord/message.cpp')
-rw-r--r--discord/message.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/discord/message.cpp b/discord/message.cpp
index 428281d..6deb63a 100644
--- a/discord/message.cpp
+++ b/discord/message.cpp
@@ -70,6 +70,18 @@ void from_json(const nlohmann::json &j, AttachmentData &m) {
JS_ON("width", m.Width);
}
+void from_json(const nlohmann::json &j, MessageReferenceData &m) {
+ JS_O("message_id", m.MessageID);
+ JS_O("channel_id", m.ChannelID);
+ JS_O("guild_id", m.GuildID);
+}
+
+void to_json(nlohmann::json &j, const MessageReferenceData &m) {
+ JS_IF("message_id", m.MessageID);
+ JS_IF("channel_id", m.ChannelID);
+ JS_IF("guild_id", m.GuildID);
+}
+
void from_json(const nlohmann::json &j, Message &m) {
JS_D("id", m.ID);
JS_D("channel_id", m.ChannelID);