dpp::select_option
dpp::json_interface< select_option >
message.h
struct friend struct json_interface< select_option > json_interface< select_option > dpp::select_option::json_interface< select_option > json_interface< select_option >
std::string std::string dpp::select_option::description description dpp::select_option::description

Additional description of the option.

partial_emoji partial_emoji dpp::select_option::emoji emoji dpp::select_option::emoji

The emoji for the select option.

bool bool dpp::select_option::is_default is_default dpp::select_option::is_default

True if option is the default option.

std::string std::string dpp::select_option::label label dpp::select_option::label

User-facing name of the option.

std::string std::string dpp::select_option::value value dpp::select_option::value

Dev-defined value of the option.

select_option & select_option & dpp::select_option::fill_from_json_impl (nlohmann::json *j) fill_from_json_impl dpp::select_option::fill_from_json_impl nlohmann::json * j

Read class values from json object j

A json object to read from

A reference to self

dpp::select_option::select_option
()
select_option
dpp::select_option::select_option

Construct a new select option object.

dpp::select_option::select_option
(std::string_view label, std::string_view value, std::string_view description="")
select_option
dpp::select_option::select_option
std::string_view label
std::string_view value
std::string_view description ""

Construct a new select option object.

label

Label of option

value

Value of option

description

Description of option

virtual dpp::select_option::~select_option
()=default
~select_option
dpp::select_option::~select_option

Destructs the select option object.

std::string std::string dpp::json_interface< select_option >::build_json (bool with_id=false) const build_json dpp::json_interface< select_option >::build_json bool with_id false

Convert object to json string.

with_id

Whether to include the ID or not

Some fields are conditionally filled, do not rely on all fields being present

std::string Json built from the structure

select_option & select_option & dpp::json_interface< select_option >::fill_from_json (nlohmann::json *j) fill_from_json dpp::json_interface< select_option >::fill_from_json nlohmann::json * j

Convert object from nlohmann::json.

j

nlohmann::json object

T& Reference to self for fluent calling

select_option & select_option & dpp::select_option::set_animated (bool anim) set_animated dpp::select_option::set_animated bool anim

Set the emoji as animated.

anim

true if animated

select_option& reference to self for chaining

select_option & select_option & dpp::select_option::set_default (bool def) set_default dpp::select_option::set_default bool def

Set the option as default.

def

true to set the option as default

select_option& reference to self for chaining

select_option & select_option & dpp::select_option::set_description (std::string_view d) set_description dpp::select_option::set_description std::string_view d

Set the description.

d

description to set. It will be truncated to the maximum length of 100 UTF-8 characters.

select_option& reference to self for chaining

select_option & select_option & dpp::select_option::set_emoji (std::string_view n, dpp::snowflake id=0, bool animated=false) set_emoji dpp::select_option::set_emoji std::string_view 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& reference to self for chaining

select_option & select_option & dpp::select_option::set_label (std::string_view l) set_label dpp::select_option::set_label std::string_view l

Set the label.

l

the user-facing name of the option. It will be truncated to the maximum length of 100 UTF-8 characters.

select_option& reference to self for chaining

select_option & select_option & dpp::select_option::set_value (std::string_view v) set_value dpp::select_option::set_value std::string_view v

Set the value.

v

value to set. It will be truncated to the maximum length of 100 UTF-8 characters.

select_option& reference to self for chaining

auto auto dpp::json_interface< select_option >::to_json (bool with_id=false) const to_json dpp::json_interface< select_option >::to_json bool with_id false

Convert object to nlohmann::json.

with_id

Whether to include the ID or not

Some fields are conditionally filled, do not rely on all fields being present

json Json built from the structure

An option for a select component.

dpp::json_interface< T >
dpp::json_interface< select_option >
< select_option >
dpp::select_option
bool
dpp::json_interface< T >
dpp::json_interface< select_option >
< select_option >
dpp::partial_emoji
name
id
animated
dpp::select_option
description
label
value
is_default
emoji
dpp::snowflake
value
std::basic_string< Char >
std::string
uint64_t
- dpp::select_option
  build_json
- dpp::select_option
  description
- dpp::select_option
  emoji
- dpp::select_option
  fill_from_json
- dpp::select_option
  fill_from_json_impl
- dpp::select_option
  is_default
- dpp::select_option
  json_interface< select_option >
- dpp::select_option
  label
- dpp::select_option
  select_option
- dpp::select_option
  select_option
- dpp::select_option
  set_animated
- dpp::select_option
  set_default
- dpp::select_option
  set_description
- dpp::select_option
  set_emoji
- dpp::select_option
  set_label
- dpp::select_option
  set_value
- dpp::select_option
  to_json
- dpp::select_option
  value
- dpp::select_option
  ~select_option