| D++ (DPP) C++ Discord API Bot Library

Search
Loading...
Searching...
No Matches
dpp::welcome_screen Struct Reference

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

`#include <guild.h>`

Inheritance diagram for dpp::welcome_screen:
[legend]
Collaboration diagram for dpp::welcome_screen:
[legend]

## Public Member Functions

| welcome_screen ()=default
| Construct a new welcome screen object.
virtual | ~welcome_screen ()=default
| Destroy the welcome screen object.
std::string | build_json (bool with_id=false) const
| Convert object to json string.
welcome_screen & | fill_from_json (nlohmann::json *j)
| Convert object from nlohmann::json.
welcome_screen & | set_description (const std::string &s)
| Set the server description for this welcome screen object shown in the welcome screen.
auto | to_json (bool with_id=false) const
| Convert object to nlohmann::json.

## Public Attributes

std::string | description
| The server description shown in the welcome screen.
std::vector< welcome_channel > | welcome_channels
| The channels shown in the welcome screen (max 5).

## Protected Member Functions

welcome_screen & | fill_from_json_impl (nlohmann::json *j)
| Read class values from json object.
json | to_json_impl (bool with_id=false) const
| Build the json for this object.

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

virtual default

Destroy the welcome screen object.

## Member Function Documentation

## ◆ build_json()

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

inline inherited

Convert object to json string.

Parameters

  with_id | Whether 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 | ) |

inline inherited

Convert object from nlohmann::json.

Parameters

  j | nlohmann::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

  j | A 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

  s | string 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

inline inherited

Convert object to nlohmann::json.

Parameters

  with_id | Whether 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_id | include the id in the JSON

Returns
  std::string json data

## Friends And Related Symbol 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 9.0.13 D++ Library version 9.0.12 D++ Library version 9.0.11 D++ Library version 9.0.10 D++ Library version 9.0.9 D++ Library version 9.0.8 D++ Library version 9.0.7 D++ Library version 9.0.6 D++ Library version 9.0.5 D++ Library version 9.0.4 D++ Library version 9.0.3 D++ Library version 9.0.2 D++ Library version 9.0.1 D++ Library version 9.0.0 D++ Library version 1.0.2 D++ Library version 1.0.1 D++ Library version 1.0.0