D++ (DPP)
C++ Discord API Bot Library
|
An option for a select component. More...
#include <message.h>
Classes | |
struct | inner_select_emoji |
Emoji definition. To set an emoji on your button you must set one of either the name or id fields. The easiest way is to use the component::set_emoji method. More... | |
Public Member Functions | |
select_option () | |
Construct a new select option object. More... | |
select_option (const std::string &label, const std::string &value, const std::string &description="") | |
Construct a new select option object. More... | |
select_option & | set_label (const std::string &l) |
Set the label. More... | |
select_option & | set_value (const std::string &v) |
Set the value. More... | |
select_option & | set_description (const std::string &d) |
Set the description. More... | |
select_option & | set_emoji (const std::string &n, dpp::snowflake id=0, bool animated=false) |
Set the emoji. More... | |
select_option & | set_default (bool def) |
Set the option as default. More... | |
select_option & | set_animated (bool anim) |
Set the emoji as animated. More... | |
Public Attributes | |
std::string | label |
Label for option. More... | |
std::string | value |
Value for option. More... | |
std::string | description |
Description of option. More... | |
bool | is_default |
True if option is the default option. More... | |
struct dpp::select_option::inner_select_emoji | emoji |
An option for a select component.
dpp::select_option::select_option | ( | ) |
Construct a new select option object.
dpp::select_option::select_option | ( | const std::string & | label, |
const std::string & | value, | ||
const std::string & | description = "" |
||
) |
Construct a new select option object.
label | Label of option |
value | Value of option |
description | Description of option |
select_option & dpp::select_option::set_animated | ( | bool | anim | ) |
Set the emoji as animated.
anim | true if animated |
select_option & dpp::select_option::set_default | ( | bool | def | ) |
Set the option as default.
def | true to set the option as default |
select_option & dpp::select_option::set_description | ( | const std::string & | d | ) |
Set the description.
d | description to set |
select_option & dpp::select_option::set_emoji | ( | const std::string & | n, |
dpp::snowflake | id = 0 , |
||
bool | animated = false |
||
) |
Set the emoji.
n | emoji name |
id | emoji id for custom emojis |
animated | true if animated emoji |
select_option & dpp::select_option::set_label | ( | const std::string & | l | ) |
select_option & dpp::select_option::set_value | ( | const std::string & | v | ) |
std::string dpp::select_option::description |
Description of option.
struct dpp::select_option::inner_select_emoji dpp::select_option::emoji |
bool dpp::select_option::is_default |
True if option is the default option.
std::string dpp::select_option::label |
Label for option.
std::string dpp::select_option::value |
Value for option.