Discord.C++ 0.13.0
Loading...
Searching...
No Matches
DiscordCPP::Member Class Reference

#include <Member.h>

Inheritance diagram for DiscordCPP::Member:
DiscordCPP::User DiscordCPP::DiscordObject

Public Member Functions

 Member (const json &data, const std::string &token)
 
 Member ()=default
 
 operator std::string () override
 
std::string get_nick ()
 the member's nickname
 
std::string get_joined_at ()
 when the member joined the server
 
bool is_deaf ()
 true, if the member is defeaned
 
bool is_mute ()
 true, if the member is muted
 
- Public Member Functions inherited from DiscordCPP::User
 User ()=default
 
 User (const json &data, const std::string &token)
 
 User (const std::string &id, const std::string &token)
 
virtual ~User ()=default
 
DMChannel get_dmchannel ()
 get/create the DMChannel for this user
 
Message send (const std::string &content, const bool tts=false)
 send a message to this user
 
Message send (const Embed &embed)
 send an embed to this user
 
std::string get_username ()
 the user's name
 
std::string get_discriminator ()
 the user's discord-tag
 
std::string get_avatar ()
 the user's avatar hash
 
bool is_bot ()
 true, if the user is a bot
 
bool is_mfa_enabled ()
 true, if the user has enabled two factor authentification
 
std::string get_locale ()
 the user's chosen language option
 
bool is_verified ()
 true, if the user's email has been verified
 
std::string get_email ()
 the user's email
 
int get_flags ()
 the flags on a user's account
 
PremiumType get_premium_type ()
 
- Public Member Functions inherited from DiscordCPP::DiscordObject
 DiscordObject ()=default
 
 DiscordObject (std::string token)
 
 DiscordObject (std::string token, std::string id)
 
std::string get_id () const
 

Additional Inherited Members

- Public Types inherited from DiscordCPP::User
enum  PremiumType { None , NitroClassic , Nitro }
 
- Protected Member Functions inherited from DiscordCPP::DiscordObject
std::string get_token () const
 
json api_call (const std::string &url, const std::string &method="GET", const json &data=json(), const std::string &content_type="", const bool cache=true)
 helper function to communicate with the http api
 

Constructor & Destructor Documentation

◆ Member() [1/2]

DiscordCPP::Member::Member ( const json & data,
const std::string & token )

◆ Member() [2/2]

DiscordCPP::Member::Member ( )
default

Member Function Documentation

◆ get_joined_at()

std::string DiscordCPP::Member::get_joined_at ( )
inline

when the member joined the server

◆ get_nick()

std::string DiscordCPP::Member::get_nick ( )
inline

the member's nickname

◆ is_deaf()

bool DiscordCPP::Member::is_deaf ( )
inline

true, if the member is defeaned

◆ is_mute()

bool DiscordCPP::Member::is_mute ( )
inline

true, if the member is muted

◆ operator std::string()

DiscordCPP::Member::operator std::string ( )
explicitoverridevirtual
Returns
Nickname (Username if not present) as std::string

Reimplemented from DiscordCPP::User.


The documentation for this class was generated from the following files: