D++ (DPP)
C++ Discord API Bot Library
dpp::voicestate Class Reference

Represents the voice state of a user on a guild These are stored in the dpp::guild object, and accessible there, or via dpp::channel::get_voice_members. More...

#include <voicestate.h>

+ Collaboration diagram for dpp::voicestate:

Public Member Functions

 voicestate ()
 Construct a new voicestate object. More...
 
 ~voicestate ()
 Destroy the voicestate object. More...
 
voicestatefill_from_json (nlohmann::json *j)
 Fill voicestate object from json data. More...
 
std::string build_json () const
 Build json representation of the object. More...
 
bool is_deaf () const
 Return true if user is deafened. More...
 
bool is_mute () const
 Return true if user is muted. More...
 
bool is_self_mute () const
 Return true if user muted themselves. More...
 
bool is_self_deaf () const
 Return true if user deafened themselves. More...
 
bool self_stream () const
 Return true if the user is streaming. More...
 
bool self_video () const
 Return true if the user is in video. More...
 
bool is_suppressed () const
 Return true if user is suppressed. "HELP HELP I'M BEING SUPPRESSED!". More...
 

Public Attributes

class discord_clientshard
 Owning shard. More...
 
snowflake guild_id
 Optional: the guild id this voice state is for. More...
 
snowflake channel_id
 the channel id this user is connected to (may be empty) More...
 
snowflake user_id
 the user id this voice state is for More...
 
std::string session_id
 the session id for this voice state More...
 
uint8_t flags
 Voice state flags. More...
 

Detailed Description

Represents the voice state of a user on a guild These are stored in the dpp::guild object, and accessible there, or via dpp::channel::get_voice_members.

Constructor & Destructor Documentation

◆ voicestate()

dpp::voicestate::voicestate ( )

Construct a new voicestate object.

◆ ~voicestate()

dpp::voicestate::~voicestate ( )

Destroy the voicestate object.

Member Function Documentation

◆ build_json()

std::string dpp::voicestate::build_json ( ) const

Build json representation of the object.

Returns
std::string JSON string

◆ fill_from_json()

voicestate & dpp::voicestate::fill_from_json ( nlohmann::json j)

Fill voicestate object from json data.

Parameters
jJSON data to fill from
Returns
voicestate& Reference to self

◆ is_deaf()

bool dpp::voicestate::is_deaf ( ) const

Return true if user is deafened.

◆ is_mute()

bool dpp::voicestate::is_mute ( ) const

Return true if user is muted.

◆ is_self_deaf()

bool dpp::voicestate::is_self_deaf ( ) const

Return true if user deafened themselves.

◆ is_self_mute()

bool dpp::voicestate::is_self_mute ( ) const

Return true if user muted themselves.

◆ is_suppressed()

bool dpp::voicestate::is_suppressed ( ) const

Return true if user is suppressed. "HELP HELP I'M BEING SUPPRESSED!".

◆ self_stream()

bool dpp::voicestate::self_stream ( ) const

Return true if the user is streaming.

◆ self_video()

bool dpp::voicestate::self_video ( ) const

Return true if the user is in video.

Member Data Documentation

◆ channel_id

snowflake dpp::voicestate::channel_id

the channel id this user is connected to (may be empty)

◆ flags

uint8_t dpp::voicestate::flags

Voice state flags.

◆ guild_id

snowflake dpp::voicestate::guild_id

Optional: the guild id this voice state is for.

◆ session_id

std::string dpp::voicestate::session_id

the session id for this voice state

◆ shard

class discord_client* dpp::voicestate::shard

Owning shard.

◆ user_id

snowflake dpp::voicestate::user_id

the user id this voice state is for

D++ Library version 10.0.35D++ Library version 10.0.34D++ Library version 10.0.33D++ Library version 10.0.32D++ Library version 10.0.31D++ Library version 10.0.30D++ Library version 10.0.29D++ Library version 10.0.28D++ Library version 10.0.27D++ Library version 10.0.26D++ Library version 10.0.25D++ Library version 10.0.24D++ Library version 10.0.23D++ Library version 10.0.22D++ Library version 10.0.21D++ Library version 10.0.20D++ Library version 10.0.19D++ Library version 10.0.18D++ Library version 10.0.17D++ Library version 10.0.16D++ Library version 10.0.15D++ Library version 10.0.14D++ Library version 10.0.13D++ Library version 10.0.12D++ Library version 10.0.11D++ Library version 10.0.10D++ Library version 10.0.9D++ Library version 10.0.8D++ Library version 10.0.7D++ Library version 10.0.6D++ Library version 10.0.5D++ Library version 10.0.4D++ Library version 10.0.3D++ Library version 10.0.2D++ Library version 10.0.1D++ Library version 10.0.0D++ Library version 9.0.19D++ Library version 9.0.18D++ Library version 9.0.17D++ Library version 9.0.16D++ Library version 9.0.15D++ Library version 9.0.14D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0