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... | |
virtual | ~voiceregion ()=default |
Destroy the voiceregion 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... | |
voiceregion & | fill_from_json (nlohmann::json *j) |
Convert object from nlohmann::json. More... | |
auto | to_json (bool with_id=false) const |
Convert object to nlohmann::json. More... | |
std::string | build_json (bool with_id=false) const |
Convert object to json string. More... | |
Public Attributes | |
std::string | id |
Voice server ID. More... | |
std::string | name |
Voice server name. More... | |
uint8_t | flags |
Flags bitmap. More... | |
Protected Member Functions | |
voiceregion & | fill_from_json_impl (nlohmann::json *j) |
Fill object properties from JSON. More... | |
virtual json | to_json_impl (bool with_id=false) const |
Build a json for this object. More... | |
Friends | |
struct | json_interface< voiceregion > |
Represents a voice region on discord.
dpp::voiceregion::voiceregion | ( | ) |
Construct a new voiceregion object.
|
virtualdefault |
Destroy the voiceregion object.
|
inlineinherited |
Convert object to json string.
with_id | Whether to include the ID or not |
|
inlineinherited |
Convert object from nlohmann::json.
j | nlohmann::json object |
|
protected |
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.
|
inlineinherited |
Convert object to nlohmann::json.
with_id | Whether to include the ID or not |
|
protectedvirtual |
Build a json for this object.
with_id | Add ID to output |
|
friend |
uint8_t dpp::voiceregion::flags |
Flags bitmap.
std::string dpp::voiceregion::id |
Voice server ID.
std::string dpp::voiceregion::name |
Voice server name.