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

Search
Loading...
Searching...
No Matches
dpp::stage_instance Struct Reference

A stage instance. Stage instances are like a conference facility, with moderators/speakers and listeners. More...

`#include <stage_instance.h>`

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

## Public Member Functions

| stage_instance ()
| Create a stage_instance object.
| ~stage_instance ()=default
| Destroy the stage_instance object.
std::string | build_json (bool with_id=false) const
| Convert object to json string.
stage_instance & | fill_from_json (nlohmann::json *j)
| Convert object from nlohmann::json.
constexpr double | get_creation_time () const noexcept
| Get the creation time of this object according to Discord.
constexpr bool | operator!= (const managed &other) const noexcept
| Comparison operator for comparing two managed objects by id.
constexpr bool | operator== (const managed &other) const noexcept
| Comparison operator for comparing two managed objects by id.
auto | to_json (bool with_id=false) const
| Convert object to nlohmann::json.

## Public Attributes

snowflake | channel_id
| The ID of the associated Stage channel.
bool | discoverable_disabled
| Whether or not Stage Discovery is disabled.
snowflake | guild_id
| The guild ID of the associated Stage channel.
snowflake | id = {}
| Unique ID of object set by Discord. This value contains a timestamp, worker ID, internal server ID, and an incrementing value. Only the timestamp is relevant to us as useful metadata.
stage_privacy_level | privacy_level
| The privacy level of the Stage instance.
std::string | topic
| The topic of the Stage instance (1-120 characters).

## Protected Member Functions

stage_instance & | fill_from_json_impl (const nlohmann::json *j)
| Serialise a stage_instance object rom json.
virtual json | to_json_impl (bool with_id=false) const
| Build json for this object.

## Friends

struct | json_interface< stage_instance >

## Detailed Description

A stage instance. Stage instances are like a conference facility, with moderators/speakers and listeners.

## Constructor & Destructor Documentation

## ◆ stage_instance()

dpp::stage_instance::stage_instance | ( |  | ) |

Create a stage_instance object.

## ◆ ~stage_instance()

dpp::stage_instance::~stage_instance | ( |  | ) |

default

Destroy the stage_instance object.

## Member Function Documentation

## ◆ build_json()

std::string dpp::json_interface< stage_instance >::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()

stage_instance & dpp::json_interface< stage_instance >::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()

stage_instance & dpp::stage_instance::fill_from_json_impl | ( | const nlohmann::json * | j | ) |

protected

Serialise a stage_instance object rom json.

Returns
  stage_instance& a reference to self

## ◆ get_creation_time()

double dpp::managed::get_creation_time | ( |  | ) | const

inline constexpr noexcept inherited

Get the creation time of this object according to Discord.

Returns
  double creation time inferred from the snowflake ID. The minimum possible value is the first second of 2015.

## ◆ operator!=()

bool dpp::managed::operator!= | ( | const managed & | other | ) | const

inline constexpr noexcept inherited

Comparison operator for comparing two managed objects by id.

Parameters

  other | Other object to compare against

Returns
  true objects are not the same id
  false objects are the same id

## ◆ operator==()

bool dpp::managed::operator== | ( | const managed & | other | ) | const

inline constexpr noexcept inherited

Comparison operator for comparing two managed objects by id.

Parameters

  other | Other object to compare against

Returns
  true objects are the same id
  false objects are not the same id

## ◆ to_json()

auto dpp::json_interface< stage_instance >::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::stage_instance::to_json_impl | ( | bool | with_id = false | ) | const

protected virtual

Build json for this object.

Parameters

  with_id | include ID

Returns
  json Json of this object

## Friends And Related Symbol Documentation

## ◆ json_interface< stage_instance >

friend struct json_interface< stage_instance >

friend

## Member Data Documentation

## ◆ channel_id

snowflake dpp::stage_instance::channel_id

The ID of the associated Stage channel.

## ◆ discoverable_disabled

bool dpp::stage_instance::discoverable_disabled

Whether or not Stage Discovery is disabled.

## ◆ guild_id

snowflake dpp::stage_instance::guild_id

The guild ID of the associated Stage channel.

## ◆ id

snowflake dpp::managed::id = {}

inherited

Unique ID of object set by Discord. This value contains a timestamp, worker ID, internal server ID, and an incrementing value. Only the timestamp is relevant to us as useful metadata.

## ◆ privacy_level

stage_privacy_level dpp::stage_instance::privacy_level

The privacy level of the Stage instance.

## ◆ topic

std::string dpp::stage_instance::topic

The topic of the Stage instance (1-120 characters).

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