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>
Represents dpp::user membership upon a dpp::guild. This contains the user's nickname, guild roles, and any other guild-specific flags.
◆ guild_member()
dpp::guild_member::guild_member |
( |
| ) |
|
◆ build_json()
std::string dpp::guild_member::build_json |
( |
| ) |
const |
Build json string for the member object.
- Returns
- std::string json string
◆ fill_from_json()
Fill this object from a json object.
- Parameters
-
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 |
- Returns
- Reference to self for call chaining
◆ get_avatar_url()
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.
- Returns
- std::string avatar or empty string
◆ get_mention()
std::string dpp::guild_member::get_mention |
( |
| ) |
const |
Return a ping/mention for the user by nickname.
- Returns
- std::string mention
◆ has_animated_guild_avatar()
bool dpp::guild_member::has_animated_guild_avatar |
( |
| ) |
const |
Returns true if the user's per-guild custom avatar is animated.
- Returns
- true user's custom avatar is animated
-
false user's custom avatar is not animated
◆ is_deaf()
bool dpp::guild_member::is_deaf |
( |
| ) |
const |
Returns true if the user is deafened.
- Returns
- true user is deafened
-
false user is not deafened
◆ is_muted()
bool dpp::guild_member::is_muted |
( |
| ) |
const |
Returns true if the user is muted.
- Returns
- true user muted
-
false user not muted
◆ is_pending()
bool dpp::guild_member::is_pending |
( |
| ) |
const |
Returns true if pending verification by membership screening.
- Returns
- true user has completed membership screening
-
false user has not completed membership screening
◆ set_communication_disabled_until()
guild_member & dpp::guild_member::set_communication_disabled_until |
( |
const time_t |
timestamp | ) |
|
Set communication_disabled_until.
- Parameters
-
timestamp | timestamp until communication is disabled |
- Returns
- guild_member& reference to self
◆ set_deaf()
guild_member & dpp::guild_member::set_deaf |
( |
const bool |
is_deafened | ) |
|
Set whether the user is deafened in voice channels.
- Parameters
-
is_deafened | value to set, true if deaf in voice channels |
- Returns
- guild_member& reference to self
◆ set_mute()
guild_member & dpp::guild_member::set_mute |
( |
const bool |
is_muted | ) |
|
Set whether the user is muted in voice channels.
- Parameters
-
is_muted | value to set, true if mute in voice channels |
- Returns
- guild_member& reference to self
◆ set_nickname()
guild_member & dpp::guild_member::set_nickname |
( |
const std::string & |
nick | ) |
|
Set the nickname.
- Parameters
-
- Returns
- guild_member& reference to self
◆ avatar
User avatar (per-server avatar is a nitro only feature)
◆ communication_disabled_until
time_t dpp::guild_member::communication_disabled_until |
timestamp of when the time out will be removed; until then, they cannot interact with the guild
◆ flags
uint8_t dpp::guild_member::flags |
◆ guild_id
◆ joined_at
time_t dpp::guild_member::joined_at |
Date and time the user joined the guild
◆ nickname
std::string dpp::guild_member::nickname |
Nickname, or empty string if they don't have a nickname on this guild
◆ premium_since
time_t dpp::guild_member::premium_since |
◆ roles
std::vector<snowflake> dpp::guild_member::roles |
List of roles this user has on this guild
◆ user_id