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

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

Represents an onboarding prompt option. More...

`#include <guild.h>`

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

## Public Member Functions

| onboarding_prompt_option ()
| Construct a new onboarding prompt option object.
virtual | ~onboarding_prompt_option ()=default
| Destroy the onboarding prompt option object.
std::string | build_json (bool with_id=false) const
| Convert object to json string.
onboarding_prompt_option & | 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.
onboarding_prompt_option & | set_description (const std::string &_description)
| Set the description of this onboarding prompt option object.
onboarding_prompt_option & | set_emoji (const dpp::emoji &_emoji)
| Set the emoji of this onboarding prompt option object.
onboarding_prompt_option & | set_title (const std::string &_title)
| Set the title of this onboarding prompt option object.
auto | to_json (bool with_id=false) const
| Convert object to nlohmann::json.

## Public Attributes

std::vector< snowflake > | channel_ids
| IDs for channels a member is added to when the option is selected.
std::string | description
| Description of the option.
dpp::emoji | emoji
| Emoji of the option.
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.
std::vector< snowflake > | role_ids
| IDs for roles assigned to a member when the option is selected.
std::string | title
| Title of the option.

## Protected Member Functions

onboarding_prompt_option & | fill_from_json_impl (nlohmann::json *j)
| Read class values from json object.
json | to_json_impl (bool with_id=false) const
| Build the json for this object.

## Friends

struct | json_interface< onboarding_prompt_option >

## Detailed Description

Represents an onboarding prompt option.

## Constructor & Destructor Documentation

## ◆ onboarding_prompt_option()

dpp::onboarding_prompt_option::onboarding_prompt_option | ( |  | ) |

Construct a new onboarding prompt option object.

## ◆ ~onboarding_prompt_option()

virtual dpp::onboarding_prompt_option::~onboarding_prompt_option | ( |  | ) |

virtual default

Destroy the onboarding prompt option object.

## Member Function Documentation

## ◆ build_json()

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

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

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

protected

Read class values from json object.

Parameters

  j | A json object to read from

Returns
  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

## ◆ set_description()

onboarding_prompt_option & dpp::onboarding_prompt_option::set_description | ( | const std::string & | _description | ) |

Set the description of this onboarding prompt option object.

Parameters

  _description | The description to set

Returns
  Reference to self, so these method calls may be chained

## ◆ set_emoji()

onboarding_prompt_option & dpp::onboarding_prompt_option::set_emoji | ( | const dpp::emoji & | _emoji | ) |

Set the emoji of this onboarding prompt option object.

Parameters

  _emoji | The emoji to set

Returns
  Reference to self, so these method calls may be chained

## ◆ set_title()

onboarding_prompt_option & dpp::onboarding_prompt_option::set_title | ( | const std::string & | _title | ) |

Set the title of this onboarding prompt option object.

Parameters

  _title | The title to set

Returns
  Reference to self, so these method calls may be chained

## ◆ to_json()

auto dpp::json_interface< onboarding_prompt_option >::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()

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

protected

Build the json for this object.

Parameters

  with_id | include the id in the JSON

Returns
  json data

## Friends And Related Symbol Documentation

## ◆ json_interface< onboarding_prompt_option >

friend struct json_interface< onboarding_prompt_option >

friend

## Member Data Documentation

## ◆ channel_ids

std::vector<snowflake> dpp::onboarding_prompt_option::channel_ids

IDs for channels a member is added to when the option is selected.

## ◆ description

std::string dpp::onboarding_prompt_option::description

Description of the option.

## ◆ emoji

dpp::emoji dpp::onboarding_prompt_option::emoji

Emoji of the option.

## ◆ 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.

## ◆ role_ids

std::vector<snowflake> dpp::onboarding_prompt_option::role_ids

IDs for roles assigned to a member when the option is selected.

## ◆ title

std::string dpp::onboarding_prompt_option::title

Title of the option.

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