From 51cf8fd2df3cf7a602d05540627a5ad8af6baa58 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 9 Sep 2020 23:17:26 -0400 Subject: rename and reorder a bunch of discord stuff --- discord/channel.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 discord/channel.cpp (limited to 'discord/channel.cpp') diff --git a/discord/channel.cpp b/discord/channel.cpp new file mode 100644 index 0000000..fe1a6a6 --- /dev/null +++ b/discord/channel.cpp @@ -0,0 +1,22 @@ +#include "channel.hpp" + +void from_json(const nlohmann::json &j, Channel &m) { + JS_D("id", m.ID); + JS_D("type", m.Type); + JS_O("guild_id", m.GuildID); + JS_O("position", m.Position); + // JS_O("permission_overwrites", m.PermissionOverwrites); + JS_ON("name", m.Name); + JS_ON("topic", m.Topic); + JS_O("nsfw", m.IsNSFW); + JS_ON("last_message_id", m.LastMessageID); + JS_O("bitrate", m.Bitrate); + JS_O("user_limit", m.UserLimit); + JS_O("rate_limit_per_user", m.RateLimitPerUser); + JS_O("recipients", m.Recipients); + JS_ON("icon", m.Icon); + JS_O("owner_id", m.OwnerID); + JS_O("application_id", m.ApplicationID); + JS_ON("parent_id", m.ParentID); + JS_ON("last_pin_timestamp", m.LastPinTimestamp); +} -- cgit v1.2.3