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

Defines a server's welcome screen. More...

#include <guild.h>

+ Inheritance diagram for dpp::welcome_screen:
+ Collaboration diagram for dpp::welcome_screen:

Public Member Functions

 welcome_screen ()=default
 Construct a new welcome screen object. More...
 
virtual ~welcome_screen ()=default
 Destroy the welcome screen object. More...
 
welcome_screenset_description (const std::string &s)
 Set the server description for this welcome screen object shown in the welcome screen. More...
 
welcome_screenfill_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::string description
 The server description shown in the welcome screen. More...
 
std::vector< welcome_channelwelcome_channels
 The channels shown in the welcome screen (max 5) More...
 

Protected Member Functions

welcome_screenfill_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< welcome_screen >
 

Detailed Description

Defines a server's welcome screen.

Constructor & Destructor Documentation

◆ welcome_screen()

dpp::welcome_screen::welcome_screen ( )
default

Construct a new welcome screen object.

◆ ~welcome_screen()

virtual dpp::welcome_screen::~welcome_screen ( )
virtualdefault

Destroy the welcome screen object.

Member Function Documentation

◆ build_json()

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

Convert object to json string.

Parameters
with_idWhether to include the ID or not
Note
Some fields are conditionally filled, do not rely on all fields being present
Returns
std::string Json built from the structure

◆ fill_from_json()

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

Convert object from nlohmann::json.

Parameters
jnlohmann::json object
Returns
T& Reference to self for fluent calling

◆ fill_from_json_impl()

welcome_screen & dpp::welcome_screen::fill_from_json_impl ( nlohmann::json *  j)
protected

Read class values from json object.

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

◆ set_description()

welcome_screen & dpp::welcome_screen::set_description ( const std::string &  s)

Set the server description for this welcome screen object shown in the welcome screen.

Parameters
sstring The server description
Returns
Reference to self, so these method calls may be chained

◆ to_json()

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

Convert object to nlohmann::json.

Parameters
with_idWhether to include the ID or not
Note
Some fields are conditionally filled, do not rely on all fields being present
Returns
json Json built from the structure

◆ to_json_impl()

json dpp::welcome_screen::to_json_impl ( bool  with_id = false) const
protected

Build the json for this object.

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

Friends And Related Function Documentation

◆ json_interface< welcome_screen >

friend struct json_interface< welcome_screen >
friend

Member Data Documentation

◆ description

std::string dpp::welcome_screen::description

The server description shown in the welcome screen.

◆ welcome_channels

std::vector<welcome_channel> dpp::welcome_screen::welcome_channels

The channels shown in the welcome screen (max 5)

D++ 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