D++ (DPP)
C++ Discord API Bot Library
dpp::onboarding_prompt_option Struct Reference

Represents an onboarding prompt option. More...

#include <guild.h>

+ Inheritance diagram for dpp::onboarding_prompt_option:
+ Collaboration diagram for dpp::onboarding_prompt_option:

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_optionfill_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_optionset_emoji (const dpp::emoji &_emoji)
 Set the emoji of this onboarding prompt option object. More...
 
onboarding_prompt_optionset_title (const std::string &_title)
 Set the title of this onboarding prompt option object. More...
 
onboarding_prompt_optionset_description (const std::string &_description)
 Set the description of this onboarding prompt option object. 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

std::vector< snowflakechannel_ids
 IDs for channels a member is added to when the option is selected. More...
 
std::vector< snowflakerole_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...
 

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 ( )
virtualdefault

Destroy the onboarding prompt option object.

Member Function Documentation

◆ build_json()

std::string dpp::onboarding_prompt_option::build_json ( bool  with_id = false) const
virtual

Build the json for this object.

Parameters
with_idinclude the id in the JSON
Returns
std::string json data

Reimplemented from dpp::json_interface< onboarding_prompt_option >.

◆ fill_from_json()

onboarding_prompt_option & dpp::onboarding_prompt_option::fill_from_json ( nlohmann::json *  j)

Read class values from json object.

Parameters
jA json object to read from
Returns
A reference to self

◆ get_creation_time()

double dpp::managed::get_creation_time ( ) const
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
noexceptinherited

Comparison operator for comparing two managed objects by id.

Parameters
otherOther 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
noexceptinherited

Comparison operator for comparing two managed objects by id.

Parameters
otherOther 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
_descriptionThe 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
_emojiThe 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
_titleThe title to set
Returns
Reference to self, so these method calls may be chained

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 10.0.35D++ Library version 10.0.34D++ Library version 10.0.33D++ Library version 10.0.32D++ Library version 10.0.31D++ Library version 10.0.30D++ Library version 10.0.29D++ Library version 10.0.28D++ Library version 10.0.27D++ Library version 10.0.26D++ Library version 10.0.25D++ Library version 10.0.24D++ Library version 10.0.23D++ Library version 10.0.22D++ Library version 10.0.21D++ Library version 10.0.20D++ Library version 10.0.19D++ Library version 10.0.18D++ Library version 10.0.17D++ Library version 10.0.16D++ Library version 10.0.15D++ Library version 10.0.14D++ Library version 10.0.13D++ Library version 10.0.12D++ Library version 10.0.11D++ Library version 10.0.10D++ Library version 10.0.9D++ Library version 10.0.8D++ Library version 10.0.7D++ Library version 10.0.6D++ Library version 10.0.5D++ Library version 10.0.4D++ Library version 10.0.3D++ Library version 10.0.2D++ Library version 10.0.1D++ Library version 10.0.0D++ Library version 9.0.19D++ Library version 9.0.18D++ Library version 9.0.17D++ Library version 9.0.16D++ Library version 9.0.15D++ Library version 9.0.14D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0