D++ (DPP)
C++ Discord API Bot Library
|
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>
Public Member Functions | |
voicestate () | |
Construct a new voicestate object. More... | |
~voicestate () | |
Destroy the voicestate object. More... | |
voicestate & | fill_from_json (nlohmann::json *j) |
Fill voicestate object from json data. More... | |
virtual std::string | build_json (bool with_id=false) 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_client * | shard |
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... | |
time_t | request_to_speak |
Time requested to speak, or 0. More... | |
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.
dpp::voicestate::voicestate | ( | ) |
Construct a new voicestate object.
dpp::voicestate::~voicestate | ( | ) |
Destroy the voicestate object.
|
virtual |
Build json representation of the object.
with_id | Add ID to output |
Reimplemented from dpp::json_interface< voicestate >.
voicestate & dpp::voicestate::fill_from_json | ( | nlohmann::json * | j | ) |
Fill voicestate object from json data.
j | JSON data to fill from |
bool dpp::voicestate::is_deaf | ( | ) | const |
Return true if user is deafened.
bool dpp::voicestate::is_mute | ( | ) | const |
Return true if user is muted.
bool dpp::voicestate::is_self_deaf | ( | ) | const |
Return true if user deafened themselves.
bool dpp::voicestate::is_self_mute | ( | ) | const |
Return true if user muted themselves.
bool dpp::voicestate::is_suppressed | ( | ) | const |
Return true if user is suppressed. "HELP HELP I'M BEING SUPPRESSED!".
bool dpp::voicestate::self_stream | ( | ) | const |
Return true if the user is streaming.
bool dpp::voicestate::self_video | ( | ) | const |
Return true if the user is in video.
snowflake dpp::voicestate::channel_id |
the channel id this user is connected to (may be empty)
uint8_t dpp::voicestate::flags |
Voice state flags.
snowflake dpp::voicestate::guild_id |
Optional: the guild id this voice state is for.
time_t dpp::voicestate::request_to_speak |
Time requested to speak, or 0.
std::string dpp::voicestate::session_id |
the session id for this voice state
class discord_client* dpp::voicestate::shard |
Owning shard.
snowflake dpp::voicestate::user_id |
the user id this voice state is for