diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-01-21 23:49:42 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-01-21 23:49:42 -0500 |
commit | 547124c94f8808d6dca407af7b6eb0d29ac12e45 (patch) | |
tree | ef79ad6ee56c6e4e294f5b946803558b592bbe59 /discord/invite.cpp | |
parent | 7b6fb861acc395a913180d8e8d2d3d503a1cf2fc (diff) | |
download | abaddon-portaudio-547124c94f8808d6dca407af7b6eb0d29ac12e45.tar.gz abaddon-portaudio-547124c94f8808d6dca407af7b6eb0d29ac12e45.zip |
view and delete invites, more tweaking
Diffstat (limited to 'discord/invite.cpp')
-rw-r--r-- | discord/invite.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/discord/invite.cpp b/discord/invite.cpp index a08bdef..641d113 100644 --- a/discord/invite.cpp +++ b/discord/invite.cpp @@ -1,14 +1,17 @@ #include "invite.hpp" -void from_json(const nlohmann::json &j, Invite &m) { +void from_json(const nlohmann::json &j, InviteData &m) { JS_D("code", m.Code); + JS_O("guild", m.Guild); JS_O("channel", m.Channel); JS_O("inviter", m.Inviter); - JS_O("approximate_member_count", m.Members); - - if (j.contains("guild")) { - auto x = j.at("guild"); - x.at("id").get_to(m.Guild.ID); - x.at("name").get_to(m.Guild.Name); - } + JS_O("target_user", m.TargetUser); + JS_O("target_user_type", m.TargetUserType); + JS_O("approximate_presence_count", m.PresenceCount); + JS_O("approximate_member_count", m.MemberCount); + JS_O("uses", m.Uses); + JS_O("max_uses", m.MaxUses); + JS_O("max_age", m.MaxAge); + JS_O("temporary", m.IsTemporary); + JS_O("created_at", m.CreatedAt); } |