summaryrefslogtreecommitdiff
path: root/src/discord/member.hpp
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 /src/discord/member.hpp
parentfd53a76bf6f53a095a639765923a30f2206b2cd6 (diff)
parente02107feea8214a045e6faa969f00dcbc0d2b072 (diff)
downloadabaddon-portaudio-e1703aea3fd597b23bde90e6c505278c517be611.tar.gz
abaddon-portaudio-e1703aea3fd597b23bde90e6c505278c517be611.zip
merge master
Diffstat (limited to 'src/discord/member.hpp')
-rw-r--r--src/discord/member.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/discord/member.hpp b/src/discord/member.hpp
new file mode 100644
index 0000000..e17da05
--- /dev/null
+++ b/src/discord/member.hpp
@@ -0,0 +1,27 @@
+#pragma once
+#include "snowflake.hpp"
+#include "json.hpp"
+#include "user.hpp"
+#include "role.hpp"
+#include <string>
+#include <vector>
+
+struct GuildMember {
+ std::optional<UserData> User; // only reliable to access id. only opt in MESSAGE_*
+ std::string Nickname;
+ std::vector<Snowflake> Roles;
+ std::string JoinedAt;
+ std::optional<std::string> PremiumSince; // null
+ bool IsDeafened;
+ bool IsMuted;
+ std::optional<Snowflake> UserID; // present in merged_members
+ std::optional<bool> IsPending; // this uses `pending` not `is_pending`
+
+ // undocuemtned moment !!!1
+ std::optional<std::string> Avatar;
+
+ std::vector<RoleData> GetSortedRoles() const;
+
+ void update_from_json(const nlohmann::json &j);
+ friend void from_json(const nlohmann::json &j, GuildMember &m);
+};