Represents an onboarding prompt option. More...
#include "guild.h"
Public Member Functions | |
onboarding_prompt_option () | |
Construct a new onboarding prompt option object. More... | |
virtual | ~onboarding_prompt_option ()=default |
Destroy the onboarding prompt option object. More... | |
std::string | build_json (bool with_id=false) const |
Convert object to json string. More... | |
onboarding_prompt_option & | 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... | |
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_option & | set_description (const std::string &_description) |
Set the description of this onboarding prompt option object. More... | |
onboarding_prompt_option & | set_emoji (const dpp::emoji &_emoji) |
Set the emoji of this onboarding prompt option object. More... | |
onboarding_prompt_option & | set_title (const std::string &_title) |
Set the title of this onboarding prompt option object. More... | |
auto | to_json (bool with_id=false) const |
Convert object to nlohmann::json. More... | |
Public Attributes | |
std::vector< snowflake > | channel_ids |
IDs for channels a member is added to when the option is selected. More... | |
std::string | description |
Description of the option. More... | |
dpp::emoji | emoji |
Emoji of the option. More... | |
snowflake | id = {} |
Unique ID of object set by Discord. More... | |
std::vector< snowflake > | role_ids |
IDs for roles assigned to a member when the option is selected. More... | |
std::string | title |
Title of the option. More... | |
Protected Member Functions | |
onboarding_prompt_option & | 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_option > |
Represents an onboarding prompt option.
dpp::onboarding_prompt_option::onboarding_prompt_option | ( | ) |
Construct a new onboarding prompt option object.
|
virtualdefault |
Destroy the onboarding prompt option 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.
|
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_option & dpp::onboarding_prompt_option::set_description | ( | const std::string & | _description | ) |
Set the description of this onboarding prompt option object.
_description | The description to set |
onboarding_prompt_option & dpp::onboarding_prompt_option::set_emoji | ( | const dpp::emoji & | _emoji | ) |
Set the emoji of this onboarding prompt option object.
_emoji | The emoji to set |
onboarding_prompt_option & dpp::onboarding_prompt_option::set_title | ( | const std::string & | _title | ) |
Set the title of this onboarding prompt option object.
_title | The title 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 |
std::vector<snowflake> dpp::onboarding_prompt_option::channel_ids |
IDs for channels a member is added to when the option is selected.
std::string dpp::onboarding_prompt_option::description |
Description of the option.
dpp::emoji dpp::onboarding_prompt_option::emoji |
Emoji of the option.
|
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<snowflake> dpp::onboarding_prompt_option::role_ids |
IDs for roles assigned to a member when the option is selected.
std::string dpp::onboarding_prompt_option::title |
Title of the option.