D++ (DPP)
C++ Discord API Bot Library
|
Represents dpp::user membership upon a dpp::guild. This contains the user's nickname, guild roles, and any other guild-specific flags. More...
#include <guild.h>
Public Member Functions | |
guild_member () | |
guild_member & | fill_from_json (nlohmann::json *j, snowflake g_id, snowflake u_id) |
std::string | build_json () const |
Build json string for the member object. More... | |
bool | is_deaf () const |
Returns true if the user is deafened. More... | |
bool | is_muted () const |
Returns true if the user is muted. More... | |
bool | is_pending () const |
Returns true if pending verification by membership screening. More... | |
bool | has_animated_guild_avatar () const |
Returns true if the user's per-guild custom avatar is animated. More... | |
std::string | get_avatar_url () const |
Returns the members's per guild avatar if they have one, otherwise returns an empty string. More... | |
Public Attributes | |
std::string | nickname |
snowflake | guild_id |
snowflake | user_id |
std::vector< snowflake > | roles |
time_t | joined_at |
time_t | premium_since |
uint8_t | flags |
utility::iconhash | avatar |
Represents dpp::user membership upon a dpp::guild. This contains the user's nickname, guild roles, and any other guild-specific flags.
dpp::guild_member::guild_member | ( | ) |
Default constructor
std::string dpp::guild_member::build_json | ( | ) | const |
Build json string for the member object.
guild_member & dpp::guild_member::fill_from_json | ( | nlohmann::json * | j, |
snowflake | g_id, | ||
snowflake | u_id | ||
) |
Fill this object from a json object.
j | The json object to get data from |
g_id | The guild id to associate the member with |
u_id | The user id to associate the member with |
std::string dpp::guild_member::get_avatar_url | ( | ) | const |
Returns the members's per guild avatar if they have one, otherwise returns an empty string.
bool dpp::guild_member::has_animated_guild_avatar | ( | ) | const |
Returns true if the user's per-guild custom avatar is animated.
bool dpp::guild_member::is_deaf | ( | ) | const |
Returns true if the user is deafened.
bool dpp::guild_member::is_muted | ( | ) | const |
Returns true if the user is muted.
bool dpp::guild_member::is_pending | ( | ) | const |
Returns true if pending verification by membership screening.
utility::iconhash dpp::guild_member::avatar |
User avatar (per-server avatar is a nitro only feature)
uint8_t dpp::guild_member::flags |
A set of flags built from the bitmask defined by dpp::guild_member_flags
snowflake dpp::guild_member::guild_id |
Guild id
time_t dpp::guild_member::joined_at |
Date and time the user joined the guild
std::string dpp::guild_member::nickname |
Nickname, or empty string if they don't have a nickname on this guild
time_t dpp::guild_member::premium_since |
Boosting since
std::vector<snowflake> dpp::guild_member::roles |
List of roles this user has on this guild
snowflake dpp::guild_member::user_id |
User id