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

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

#include <guild.h>

+ Inheritance diagram for dpp::welcome_channel:
+ Collaboration diagram for dpp::welcome_channel:

Public Member Functions

 welcome_channel ()
 Construct a new welcome channel object. More...
 
virtual ~welcome_channel ()=default
 Destroy the welcome channel object. More...
 
welcome_channelset_channel_id (const snowflake _channel_id)
 Set the channel ID of this welcome channel object. More...
 
welcome_channelset_description (const std::string &_description)
 Set the description of this welcome channel object. More...
 
welcome_channelfill_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 description shown for the channel. More...
 
std::string emoji_name
 The emoji name if custom, the unicode character if standard, or null if no emoji is set. More...
 
snowflake channel_id
 The channel's id. More...
 
snowflake emoji_id
 The emoji id, if the emoji is custom. More...
 

Protected Member Functions

welcome_channelfill_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_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 ( )
virtualdefault

Destroy the welcome channel object.

Member Function Documentation

◆ build_json()

std::string dpp::json_interface< welcome_channel >::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_channel & dpp::json_interface< welcome_channel >::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_channel & dpp::welcome_channel::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_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_idThe 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
_descriptionThe 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
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_channel::to_json_impl ( bool  with_id = false) const
protected

Build the json for this object.

Parameters
with_idinclude the id in the JSON
Returns
json JSON data

Friends And Related Function 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 if custom, the unicode character if standard, or null if no emoji is set.

D++ Library version 10.0.35D++ Library version 10.0.34D++ Library version 10.0.33D++ Library version 10.0.32D++ Library version 10.0.31D++ Library version 10.0.30D++ 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