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

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

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

`#include <guild.h>`

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

## Public Member Functions

| welcome_channel ()
| Construct a new welcome channel object.
virtual | ~welcome_channel ()=default
| Destroy the welcome channel object.
std::string | build_json (bool with_id=false) const
| Convert object to json string.
welcome_channel & | fill_from_json (nlohmann::json *j)
| Convert object from nlohmann::json.
welcome_channel & | set_channel_id (const snowflake _channel_id)
| Set the channel ID of this welcome channel object.
welcome_channel & | set_description (const std::string &_description)
| Set the description of this welcome channel object.
auto | to_json (bool with_id=false) const
| Convert object to nlohmann::json.

## Public Attributes

snowflake | channel_id
| The channel's id.
std::string | description
| The description shown for the channel.
snowflake | emoji_id
| The emoji id, if the emoji is custom.
std::string | emoji_name
| The emoji name.

## Protected Member Functions

welcome_channel & | 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_channel >

## Detailed Description

Defines a channel on a server's welcome screen.

## Constructor & Destructor Documentation

## ◆ welcome_channel()

dpp::welcome_channel::welcome_channel | ( |  | ) |

Construct a new welcome channel object.

## ◆ ~welcome_channel()

virtual dpp::welcome_channel::~welcome_channel | ( |  | ) |

virtual default

Destroy the welcome channel object.

## Member Function Documentation

## ◆ build_json()

std::string dpp::json_interface< welcome_channel >::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_channel & dpp::json_interface< welcome_channel >::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_channel & dpp::welcome_channel::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_channel_id()

welcome_channel & dpp::welcome_channel::set_channel_id | ( | const snowflake | _channel_id | ) |

Set the channel ID of this welcome channel object.

Parameters

  _channel_id | The channel ID to set

Returns
  Reference to self, so these method calls may be chained

## ◆ set_description()

welcome_channel & dpp::welcome_channel::set_description | ( | const std::string & | _description | ) |

Set the description of this welcome channel object.

Parameters

  _description | The description to set

Returns
  Reference to self, so these method calls may be chained

## ◆ to_json()

auto dpp::json_interface< welcome_channel >::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_channel::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
  json JSON data

## Friends And Related Symbol Documentation

## ◆ json_interface< welcome_channel >

friend struct json_interface< welcome_channel >

friend

## Member Data Documentation

## ◆ channel_id

snowflake dpp::welcome_channel::channel_id

The channel's id.

## ◆ description

std::string dpp::welcome_channel::description

The description shown for the channel.

## ◆ emoji_id

snowflake dpp::welcome_channel::emoji_id

The emoji id, if the emoji is custom.

## ◆ emoji_name

std::string dpp::welcome_channel::emoji_name

The emoji name.

Note
  name if custom, the unicode character if standard, or null if no emoji is set.

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