#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; // null std::vector Roles; std::string JoinedAt; std::optional PremiumSince; // null bool IsDeafened; bool IsMuted; std::vector GetSortedRoles() const; void update_from_json(const nlohmann::json &j); friend void from_json(const nlohmann::json &j, GuildMember &m); };