D++ (DPP)
C++ Discord API Bot Library
|
Represents an onboarding prompt. More...
#include <guild.h>
Public Member Functions | |
onboarding_prompt () | |
Construct a new onboarding prompt object. More... | |
virtual | ~onboarding_prompt ()=default |
Destroy the onboarding prompt object. More... | |
onboarding_prompt & | fill_from_json (nlohmann::json *j) |
Read class values from json object. More... | |
std::string | build_json (bool with_id=false) const |
Build the json for this object. More... | |
onboarding_prompt & | set_type (const onboarding_prompt_type _type) |
Set the type of this onboarding prompt object. More... | |
onboarding_prompt & | set_title (const std::string &_title) |
Set the title of this onboarding prompt object. More... | |
bool | is_single_select () const |
Indicates whether users are limited to selecting one option for the prompt. More... | |
bool | is_required () const |
Indicates whether the prompt is required before a user completes the onboarding flow. More... | |
bool | is_in_onboarding () const |
Indicates whether the prompt is present in the onboarding flow. More... | |
double | get_creation_time () const |
Get the creation time of this object according to Discord. More... | |
bool | operator== (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
bool | operator!= (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
Public Attributes | |
onboarding_prompt_type | type |
Type of prompt (defaults to dpp::opt_multiple_choice) More... | |
std::vector< onboarding_prompt_option > | options |
Options available within the prompt. More... | |
std::string | title |
Title of the prompt. More... | |
uint8_t | flags |
A set of flags built from the bitmask defined by dpp::onboarding_prompt_flags. More... | |
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. More... | |
Represents an onboarding prompt.
dpp::onboarding_prompt::onboarding_prompt | ( | ) |
Construct a new onboarding prompt object.
|
virtualdefault |
Destroy the onboarding prompt object.
|
virtual |
Build the json for this object.
with_id | include the id in the JSON |
Reimplemented from dpp::json_interface< onboarding_prompt >.
onboarding_prompt & dpp::onboarding_prompt::fill_from_json | ( | nlohmann::json * | j | ) |
Read class values from json object.
j | A json object to read from |
|
inherited |
Get the creation time of this object according to Discord.
bool dpp::onboarding_prompt::is_in_onboarding | ( | ) | const |
Indicates whether the prompt is present in the onboarding flow.
bool dpp::onboarding_prompt::is_required | ( | ) | const |
Indicates whether the prompt is required before a user completes the onboarding flow.
bool dpp::onboarding_prompt::is_single_select | ( | ) | const |
Indicates whether users are limited to selecting one option for the prompt.
|
noexceptinherited |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
|
noexceptinherited |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
onboarding_prompt & dpp::onboarding_prompt::set_title | ( | const std::string & | _title | ) |
Set the title of this onboarding prompt object.
_title | The title to set |
onboarding_prompt & dpp::onboarding_prompt::set_type | ( | const onboarding_prompt_type | _type | ) |
Set the type of this onboarding prompt object.
_type | The prompt type to set |
uint8_t dpp::onboarding_prompt::flags |
A set of flags built from the bitmask defined by dpp::onboarding_prompt_flags.
|
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.
std::vector<onboarding_prompt_option> dpp::onboarding_prompt::options |
Options available within the prompt.
std::string dpp::onboarding_prompt::title |
Title of the prompt.
onboarding_prompt_type dpp::onboarding_prompt::type |
Type of prompt (defaults to dpp::opt_multiple_choice)