D++ (DPP)
C++ Discord API Bot Library
|
Represents a user on discord. May or may not be a member of a dpp::guild. More...
#include <user.h>
Public Member Functions | |
user () | |
Construct a new user object. More... | |
~user () | |
Destroy the user object. More... | |
user & | fill_from_json (nlohmann::json *j) |
std::string | get_avatar_url () const |
Get the avatar url of the user object. More... | |
bool | is_bot () const |
User is a bot. More... | |
bool | is_system () const |
User is a system user (Clyde) More... | |
bool | is_mfa_enabled () const |
User has multi-factor authentication enabled. More... | |
bool | is_verified () const |
Return true if user has verified account. More... | |
bool | has_nitro_full () const |
Return true if user has full nitro. This is mutually exclusive with full nitro. More... | |
bool | has_nitro_classic () const |
Return true if user has nitro classic. This is mutually exclusive with nitro classic. More... | |
bool | is_discord_employee () const |
Return true if user is a discord employee. More... | |
bool | is_partnered_owner () const |
Return true if user owns a partnered server. More... | |
bool | has_hypesquad_events () const |
Return true if user has hypesquad events. More... | |
bool | is_bughunter_1 () const |
Return true if user has the bughunter level 1 badge. More... | |
bool | is_house_bravery () const |
Return true if user is in house bravery. More... | |
bool | is_house_brilliance () const |
Return true if user is in house brilliance. More... | |
bool | is_house_balanace () const |
Return true if user is in house balance. More... | |
bool | is_early_supporter () const |
Return true if user is an early supporter. More... | |
bool | is_team_user () const |
Return true if user is a team user. More... | |
bool | is_bughunter_2 () const |
Return true if user has the bughunter level 2 badge. More... | |
bool | is_verified_bot () const |
Return true if user has the verified bot badge. More... | |
bool | is_verified_bot_dev () const |
Return true if user is an early verified bot developer. More... | |
bool | is_certified_moderator () const |
Return true if user is a certified moderator. More... | |
bool | has_animated_icon () const |
Return true if user has an animated icon. More... | |
Public Attributes | |
std::string | username |
uint16_t | discriminator |
utility::iconhash | avatar |
uint32_t | flags |
uint8_t | refcount |
snowflake | id |
Represents a user on discord. May or may not be a member of a dpp::guild.
dpp::user::user | ( | ) |
Construct a new user object.
dpp::user::~user | ( | ) |
Destroy the user object.
user & dpp::user::fill_from_json | ( | nlohmann::json * | j | ) |
Fill this record from json.
j | The json to fill this record from |
std::string dpp::user::get_avatar_url | ( | ) | const |
Get the avatar url of the user object.
bool dpp::user::has_animated_icon | ( | ) | const |
Return true if user has an animated icon.
bool dpp::user::has_hypesquad_events | ( | ) | const |
Return true if user has hypesquad events.
bool dpp::user::has_nitro_classic | ( | ) | const |
Return true if user has nitro classic. This is mutually exclusive with nitro classic.
bool dpp::user::has_nitro_full | ( | ) | const |
Return true if user has full nitro. This is mutually exclusive with full nitro.
bool dpp::user::is_bot | ( | ) | const |
User is a bot.
bool dpp::user::is_bughunter_1 | ( | ) | const |
Return true if user has the bughunter level 1 badge.
bool dpp::user::is_bughunter_2 | ( | ) | const |
Return true if user has the bughunter level 2 badge.
bool dpp::user::is_certified_moderator | ( | ) | const |
Return true if user is a certified moderator.
bool dpp::user::is_discord_employee | ( | ) | const |
Return true if user is a discord employee.
bool dpp::user::is_early_supporter | ( | ) | const |
Return true if user is an early supporter.
bool dpp::user::is_house_balanace | ( | ) | const |
Return true if user is in house balance.
bool dpp::user::is_house_bravery | ( | ) | const |
Return true if user is in house bravery.
bool dpp::user::is_house_brilliance | ( | ) | const |
Return true if user is in house brilliance.
bool dpp::user::is_mfa_enabled | ( | ) | const |
User has multi-factor authentication enabled.
bool dpp::user::is_partnered_owner | ( | ) | const |
Return true if user owns a partnered server.
bool dpp::user::is_system | ( | ) | const |
User is a system user (Clyde)
bool dpp::user::is_team_user | ( | ) | const |
Return true if user is a team user.
bool dpp::user::is_verified | ( | ) | const |
Return true if user has verified account.
bool dpp::user::is_verified_bot | ( | ) | const |
Return true if user has the verified bot badge.
bool dpp::user::is_verified_bot_dev | ( | ) | const |
Return true if user is an early verified bot developer.
utility::iconhash dpp::user::avatar |
Avatar hash
uint16_t dpp::user::discriminator |
Discriminator (aka tag), 4 digits usually displayed with leading zeroes
uint32_t dpp::user::flags |
Flags built from a bitmask of values in dpp::user_flags
|
inherited |
Unique ID of object
uint8_t dpp::user::refcount |
Reference count of how many guilds this user is in
std::string dpp::user::username |
Discord username