Files
abaddon/discord/member.hpp
ouwou fd72d91cee handle merged_members in ready object
this way you dont have to load a channel to make the client aware of your permissions
2021-01-23 18:23:14 -05:00

24 lines
678 B
C++

#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; // null
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::vector<RoleData> GetSortedRoles() const;
void update_from_json(const nlohmann::json &j);
friend void from_json(const nlohmann::json &j, GuildMember &m);
};