D++ (DPP)
C++ Discord API Bot Library
|
Represents a voice region on discord. More...
#include <voiceregion.h>
Public Member Functions | |
voiceregion () | |
Construct a new voiceregion object. More... | |
~voiceregion () | |
Destroy the voiceregion object. More... | |
voiceregion & | fill_from_json (nlohmann::json *j) |
Fill object properties from JSON. More... | |
std::string | build_json (bool with_id=false) const |
Build a json string for this object. More... | |
bool | is_optimal () const |
True if is the optimal voice server. More... | |
bool | is_deprecated () const |
True if is a deprecated voice server. More... | |
bool | is_custom () const |
True if is a custom voice server. More... | |
bool | is_vip () const |
True if is a VIP voice server. More... | |
voiceregion & | parse_from_json (nlohmann::json *j) |
Convert object from nlohmann::json. More... | |
Public Attributes | |
std::string | id |
Voice server ID. More... | |
std::string | name |
Voice server name. More... | |
uint8_t | flags |
Flags bitmap. More... | |
Represents a voice region on discord.
dpp::voiceregion::voiceregion | ( | ) |
Construct a new voiceregion object.
dpp::voiceregion::~voiceregion | ( | ) |
Destroy the voiceregion object.
|
virtual |
Build a json string for this object.
with_id | Add ID to output |
Reimplemented from dpp::json_interface< voiceregion >.
voiceregion & dpp::voiceregion::fill_from_json | ( | nlohmann::json * | j | ) |
Fill object properties from JSON.
j | JSON to fill from |
bool dpp::voiceregion::is_custom | ( | ) | const |
True if is a custom voice server.
bool dpp::voiceregion::is_deprecated | ( | ) | const |
True if is a deprecated voice server.
bool dpp::voiceregion::is_optimal | ( | ) | const |
True if is the optimal voice server.
bool dpp::voiceregion::is_vip | ( | ) | const |
True if is a VIP voice server.
|
inlineinherited |
Convert object from nlohmann::json.
j | nlohmann::json object |
uint8_t dpp::voiceregion::flags |
Flags bitmap.
std::string dpp::voiceregion::id |
Voice server ID.
std::string dpp::voiceregion::name |
Voice server name.