#pragma once #include "snowflake.hpp" #include "json.hpp" #include "user.hpp" #include "role.hpp" #include #include struct GuildMember { std::optional User; // only reliable to access id. only opt in MESSAGE_* std::string Nickname; std::vector Roles; std::string JoinedAt; std::optional PremiumSince; // null bool IsDeafened; bool IsMuted; std::optional UserID; // present in merged_members std::optional IsPending; // this uses `pending` not `is_pending` // undocuemtned moment !!!1 std::optional Avatar; std::vector GetSortedRoles() const; void update_from_json(const nlohmann::json &j); friend void from_json(const nlohmann::json &j, GuildMember &m); };