Defines a channel on a server's welcome screen. More...
#include "guild.h"
Public Member Functions | |
welcome_channel () | |
Construct a new welcome channel object. More... | |
virtual | ~welcome_channel ()=default |
Destroy the welcome channel object. More... | |
template<typename U = T, typename = decltype(std::declval<U&>().to_json_impl(bool{}))> | |
std::string | build_json (bool with_id=false) const |
Convert object to json string. More... | |
template<typename U = T, typename = decltype(std::declval<U&>().fill_from_json_impl(std::declval<nlohmann::json*>()))> | |
T & | fill_from_json (nlohmann::json *j) |
Convert object from nlohmann::json. More... | |
welcome_channel & | set_channel_id (const snowflake _channel_id) |
Set the channel ID of this welcome channel object. More... | |
welcome_channel & | set_description (const std::string &_description) |
Set the description of this welcome channel object. More... | |
template<typename U = T, typename = decltype(std::declval<U&>().to_json_impl(bool{}))> | |
auto | to_json (bool with_id=false) const |
Convert object to nlohmann::json. More... | |
Public Attributes | |
snowflake | channel_id |
The channel's id. More... | |
std::string | description |
The description shown for the channel. More... | |
snowflake | emoji_id |
The emoji id, if the emoji is custom. More... | |
std::string | emoji_name |
The emoji name. More... | |
Protected Member Functions | |
welcome_channel & | fill_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 > |
Defines a channel on a server's welcome screen.
dpp::welcome_channel::welcome_channel | ( | ) |
Construct a new welcome channel object.
|
virtualdefault |
Destroy the welcome channel object.
|
inlineinherited |
Convert object to json string.
with_id | Whether to include the ID or not |
Referenced by dpp::cluster::create_webhook(), dpp::cluster::guild_ban_add(), dpp::cluster::guild_ban_delete(), dpp::cluster::guild_command_edit_permissions(), dpp::cluster::guild_create(), dpp::cluster::guild_get_integrations(), dpp::cluster::guild_get_preview(), dpp::cluster::guild_get_vanity(), and dpp::cluster::roles_get().
|
inlineinherited |
Convert object from nlohmann::json.
j | nlohmann::json object |
Referenced by dpp::invite::fill_from_json_impl(), dpp::thread::fill_from_json_impl(), dpp::scheduled_event::fill_from_json_impl(), dpp::from_json(), dpp::message::get_url(), and dpp::interaction_response::interaction_response().
|
protected |
Read class values from json object.
j | A json object to read from |
welcome_channel & dpp::welcome_channel::set_channel_id | ( | const snowflake | _channel_id | ) |
Set the channel ID of this welcome channel object.
_channel_id | The channel ID to set |
References dpp::welcome_screen::description.
welcome_channel & dpp::welcome_channel::set_description | ( | const std::string & | _description | ) |
Set the description of this welcome channel object.
_description | The description to set |
|
inlineinherited |
Convert object to nlohmann::json.
with_id | Whether to include the ID or not |
Referenced by dpp::cluster::delete_webhook_with_token(), and dpp::onboarding_prompt::onboarding_prompt().
|
protected |
Build the json for this object.
with_id | include the id in the JSON |
|
friend |
snowflake dpp::welcome_channel::channel_id |
The channel's id.
Referenced by dpp::guild_member::has_started_onboarding().
std::string dpp::welcome_channel::description |
The description shown for the channel.
snowflake dpp::welcome_channel::emoji_id |
The emoji id, if the emoji is custom.
Referenced by dpp::guild_member::has_bypasses_verification().
std::string dpp::welcome_channel::emoji_name |
The emoji name.