diff options
Diffstat (limited to 'discord/channel.cpp')
-rw-r--r-- | discord/channel.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/discord/channel.cpp b/discord/channel.cpp index e5dfb06..685cc72 100644 --- a/discord/channel.cpp +++ b/discord/channel.cpp @@ -1,13 +1,20 @@ #include "../abaddon.hpp" #include "channel.hpp" -void from_json(const nlohmann::json &j, ThreadMetadata &m) { +void from_json(const nlohmann::json &j, ThreadMetadataData &m) { JS_D("archived", m.IsArchived); JS_D("auto_archive_duration", m.AutoArchiveDuration); JS_D("archive_timestamp", m.ArchiveTimestamp); JS_O("locked", m.IsLocked); } +void from_json(const nlohmann::json &j, ThreadMemberObject &m) { + JS_O("id", m.ThreadID); + JS_O("user_id", m.ThreadID); + JS_D("join_timestamp", m.JoinTimestamp); + JS_D("flags", m.Flags); +} + void from_json(const nlohmann::json &j, ChannelData &m) { JS_D("id", m.ID); JS_D("type", m.Type); @@ -29,6 +36,7 @@ void from_json(const nlohmann::json &j, ChannelData &m) { JS_ON("parent_id", m.ParentID); JS_ON("last_pin_timestamp", m.LastPinTimestamp); JS_O("thread_metadata", m.ThreadMetadata); + JS_O("member", m.ThreadMember); } void ChannelData::update_from_json(const nlohmann::json &j) { |