| D++ (DPP) C++ Discord API Bot Library

Search
Loading...
Searching...
No Matches
dpp::voiceregion Class Reference

Represents a voice region on discord. More...

`#include <voiceregion.h>`

Inheritance diagram for dpp::voiceregion:
[legend]
Collaboration diagram for dpp::voiceregion:
[legend]

## Public Member Functions

| voiceregion ()
| Construct a new voiceregion object.
virtual | ~voiceregion ()=default
| Destroy the voiceregion object.
std::string | build_json (bool with_id=false) const
| Convert object to json string.
voiceregion & | fill_from_json (nlohmann::json *j)
| Convert object from nlohmann::json.
bool | is_custom () const
| True if is a custom voice server.
bool | is_deprecated () const
| True if is a deprecated voice server.
bool | is_optimal () const
| True if is the optimal voice server.
auto | to_json (bool with_id=false) const
| Convert object to nlohmann::json.

## Public Attributes

uint8_t | flags
| Flags bitmap.
std::string | id
| Voice server ID.
std::string | name
| Voice server name.

## Protected Member Functions

voiceregion & | fill_from_json_impl (nlohmann::json *j)
| Fill object properties from JSON.
virtual json | to_json_impl (bool with_id=false) const
| Build a json for this object.

## Friends

struct | json_interface< voiceregion >

## Detailed Description

Represents a voice region on discord.

## Constructor & Destructor Documentation

## ◆ voiceregion()

dpp::voiceregion::voiceregion | ( |  | ) |

Construct a new voiceregion object.

## ◆ ~voiceregion()

virtual dpp::voiceregion::~voiceregion | ( |  | ) |

virtual default

Destroy the voiceregion object.

## Member Function Documentation

## ◆ build_json()

std::string dpp::json_interface< voiceregion >::build_json | ( | bool | with_id = false | ) | const

inline inherited

Convert object to json string.

Parameters

  with_id | Whether to include the ID or not

Note
  Some fields are conditionally filled, do not rely on all fields being present

Returns
  std::string Json built from the structure

## ◆ fill_from_json()

voiceregion & dpp::json_interface< voiceregion >::fill_from_json | ( | nlohmann::json * | j | ) |

inline inherited

Convert object from nlohmann::json.

Parameters

  j | nlohmann::json object

Returns
  T& Reference to self for fluent calling

## ◆ fill_from_json_impl()

voiceregion & dpp::voiceregion::fill_from_json_impl | ( | nlohmann::json * | j | ) |

protected

Fill object properties from JSON.

Parameters

  j | JSON to fill from

Returns
  voiceregion& Reference to self

## ◆ is_custom()

bool dpp::voiceregion::is_custom | ( |  | ) | const

True if is a custom voice server.

Returns
  true if custom

## ◆ is_deprecated()

bool dpp::voiceregion::is_deprecated | ( |  | ) | const

True if is a deprecated voice server.

Returns
  true if deprecated

## ◆ is_optimal()

bool dpp::voiceregion::is_optimal | ( |  | ) | const

True if is the optimal voice server.

Returns
  true if optimal

## ◆ to_json()

auto dpp::json_interface< voiceregion >::to_json | ( | bool | with_id = false | ) | const

inline inherited

Convert object to nlohmann::json.

Parameters

  with_id | Whether to include the ID or not

Note
  Some fields are conditionally filled, do not rely on all fields being present

Returns
  json Json built from the structure

## ◆ to_json_impl()

virtual json dpp::voiceregion::to_json_impl | ( | bool | with_id = false | ) | const

protected virtual

Build a json for this object.

Parameters

  with_id | Add ID to output

Returns
  json JSON string

## Friends And Related Symbol Documentation

## ◆ json_interface< voiceregion >

friend struct json_interface< voiceregion >

friend

## Member Data Documentation

## ◆ flags

uint8_t dpp::voiceregion::flags

Flags bitmap.

## ◆ id

std::string dpp::voiceregion::id

Voice server ID.

## ◆ name

std::string dpp::voiceregion::name

Voice server name.

D++ Library version 9.0.13 D++ Library version 9.0.12 D++ Library version 9.0.11 D++ Library version 9.0.10 D++ Library version 9.0.9 D++ Library version 9.0.8 D++ Library version 9.0.7 D++ Library version 9.0.6 D++ Library version 9.0.5 D++ Library version 9.0.4 D++ Library version 9.0.3 D++ Library version 9.0.2 D++ Library version 9.0.1 D++ Library version 9.0.0 D++ Library version 1.0.2 D++ Library version 1.0.1 D++ Library version 1.0.0