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... | |
std::string | build_json (bool with_id=false) const |
Convert object to json string. More... | |
onboarding_prompt & | fill_from_json (nlohmann::json *j) |
Convert object from nlohmann::json. More... | |
constexpr double | get_creation_time () const noexcept |
Get the creation time of this object according to Discord. More... | |
bool | is_in_onboarding () const |
Indicates whether the prompt is present in the onboarding flow. More... | |
bool | is_required () const |
Indicates whether the prompt is required before a user completes the onboarding flow. More... | |
bool | is_single_select () const |
Indicates whether users are limited to selecting one option for the prompt. More... | |
constexpr bool | operator!= (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
constexpr bool | operator== (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
onboarding_prompt & | set_title (const std::string &_title) |
Set the title of this onboarding prompt object. More... | |
onboarding_prompt & | set_type (const onboarding_prompt_type _type) |
Set the type of this onboarding prompt object. More... | |
auto | to_json (bool with_id=false) const |
Convert object to nlohmann::json. More... | |
Public Attributes | |
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. More... | |
std::vector< onboarding_prompt_option > | options |
Options available within the prompt. More... | |
std::string | title |
Title of the prompt. More... | |
onboarding_prompt_type | type |
Type of prompt (defaults to dpp::opt_multiple_choice). More... | |
Protected Member Functions | |
onboarding_prompt & | fill_from_json_impl (nlohmann::json *j) |
Read class values from json object. More... | |
json | to_json_impl (bool with_id=false) const |
Build the json for this object. More... | |
Friends | |
struct | json_interface< onboarding_prompt > |
Represents an onboarding prompt.
dpp::onboarding_prompt::onboarding_prompt | ( | ) |
Construct a new onboarding prompt object.
References dpp::json_interface< T >::to_json().
|
virtualdefault |
Destroy the onboarding prompt 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 |
Read class values from json object.
j | A json object to read from |
|
inlineconstexprnoexceptinherited |
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.
|
inlineconstexprnoexceptinherited |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
|
inlineconstexprnoexceptinherited |
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 |
|
inlineinherited |
Convert object to nlohmann::json.
with_id | Whether to include the ID or not |
|
protected |
Build the json for this object.
with_id | include the id in the JSON |
|
friend |
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.
Referenced by dpp::poll::add_answer(), dpp::cluster::create_webhook(), dpp::cluster::current_user_join_thread(), dpp::invite::fill_from_json_impl(), dpp::command_permission::fill_from_json_impl(), dpp::interaction::get_resolved_role(), dpp::interaction::get_resolved_user(), dpp::cluster::global_bulk_command_create(), dpp::cluster::global_bulk_command_delete(), dpp::cluster::global_command_delete(), dpp::cluster::global_command_edit(), dpp::cluster::guild_ban_delete(), dpp::cluster::guild_command_create(), dpp::cluster::guild_command_edit_permissions(), dpp::cluster::guild_get_integrations(), dpp::events::guild_member_update::handle(), dpp::events::guild_role_create::handle(), dpp::events::channel_create::handle(), dpp::events::voice_state_update::handle(), dpp::discord_voice_client::handle_frame(), main(), dpp::component::set_disabled(), and dpp::select_option::set_label().
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).