D++ (DPP)
C++ Discord API Bot Library
|
Represents an onboarding prompt option. More...
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... | |
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... | |
onboarding_prompt_option & | set_description (const std::string &_description) |
Set the description of this onboarding prompt option object. 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 & | fill_from_json (nlohmann::json *j) |
Convert object from nlohmann::json. More... | |
auto | to_json (bool with_id=false) const |
Convert object to nlohmann::json. More... | |
std::string | build_json (bool with_id=false) const |
Convert object to json string. More... | |
Public Attributes | |
std::vector< snowflake > | channel_ids |
IDs for channels a member is added to when the option is selected. More... | |
std::vector< snowflake > | role_ids |
IDs for roles assigned to a member when the option is selected. More... | |
dpp::emoji | emoji |
Emoji of the option. More... | |
std::string | title |
Title of the option. More... | |
std::string | description |
Description of the option. 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... | |
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.
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.