summaryrefslogtreecommitdiff
path: root/discord/invite.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-11-28 22:48:30 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2021-11-28 22:48:30 -0500
commite1703aea3fd597b23bde90e6c505278c517be611 (patch)
tree37d98fc90c9cd0844388bfb79beda2204f44af92 /discord/invite.cpp
parentfd53a76bf6f53a095a639765923a30f2206b2cd6 (diff)
parente02107feea8214a045e6faa969f00dcbc0d2b072 (diff)
downloadabaddon-portaudio-e1703aea3fd597b23bde90e6c505278c517be611.tar.gz
abaddon-portaudio-e1703aea3fd597b23bde90e6c505278c517be611.zip
merge master
Diffstat (limited to 'discord/invite.cpp')
-rw-r--r--discord/invite.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/discord/invite.cpp b/discord/invite.cpp
deleted file mode 100644
index 63043a1..0000000
--- a/discord/invite.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "invite.hpp"
-
-void from_json(const nlohmann::json &j, InviteChannelData &m) {
- JS_D("id", m.ID);
- JS_D("type", m.Type);
- JS_ON("name", m.Name);
- if (j.contains("recipients") && j.at("recipients").is_null()) {
- m.RecipientUsernames.emplace();
- for (const auto &x : j.at("recipients"))
- m.RecipientUsernames->push_back(x.at("username").get<std::string>());
- }
-}
-
-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("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);
-}
-
-InviteChannelData::InviteChannelData(const ChannelData &c) {
- ID = c.ID;
- Type = c.Type;
- Name = c.Name;
- if (Type == ChannelType::GROUP_DM) {
- RecipientUsernames.emplace();
- for (const auto &r : c.GetDMRecipients())
- RecipientUsernames->push_back(r.Username);
- }
-}