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

Represents a guild's onboarding flow. More...

#include "guild.h"

Inheritance diagram for dpp::onboarding:
Collaboration diagram for dpp::onboarding:

Public Member Functions

 onboarding ()
 Construct a new onboarding object. More...
 
virtual ~onboarding ()=default
 Destroy the onboarding object. More...
 
std::string build_json (bool with_id=false) const
 Convert object to json string. More...
 
onboardingfill_from_json (nlohmann::json *j)
 Convert object from nlohmann::json. More...
 
onboardingset_enabled (const bool is_enabled)
 Set the enabling of this onboarding object. More...
 
onboardingset_guild_id (const snowflake id)
 Set guild_id of this onboarding object. More...
 
onboardingset_mode (const onboarding_mode m)
 Set the mode of this onboarding object. More...
 
auto to_json (bool with_id=false) const
 Convert object to nlohmann::json. More...
 

Public Attributes

std::vector< snowflakedefault_channel_ids
 Channel IDs that members get opted into automatically. More...
 
bool enabled
 Whether onboarding is enabled in the guild. More...
 
snowflake guild_id
 ID of the guild this onboarding is part of. More...
 
onboarding_mode mode
 Current mode of onboarding (defaults to dpp::gom_default) More...
 
std::vector< onboarding_promptprompts
 Prompts shown during onboarding and in customize community. More...
 

Protected Member Functions

onboardingfill_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< onboarding >
 

Detailed Description

Represents a guild's onboarding flow.

Constructor & Destructor Documentation

◆ onboarding()

dpp::onboarding::onboarding ( )

Construct a new onboarding object.

◆ ~onboarding()

virtual dpp::onboarding::~onboarding ( )
virtualdefault

Destroy the onboarding object.

Member Function Documentation

◆ build_json()

std::string dpp::json_interface< onboarding >::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()

onboarding & dpp::json_interface< onboarding >::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()

onboarding & dpp::onboarding::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_enabled()

onboarding & dpp::onboarding::set_enabled ( const bool  is_enabled)

Set the enabling of this onboarding object.

Parameters
is_enabledbool Whether onboarding is enabled in the guild
Returns
Reference to self, so these method calls may be chained

◆ set_guild_id()

onboarding & dpp::onboarding::set_guild_id ( const snowflake  id)

Set guild_id of this onboarding object.

Parameters
idGuild ID to set
Returns
Reference to self, so these method calls may be chained

◆ set_mode()

onboarding & dpp::onboarding::set_mode ( const onboarding_mode  m)

Set the mode of this onboarding object.

Parameters
monboarding_mode Mode to set
Returns
Reference to self, so these method calls may be chained

◆ to_json()

auto dpp::json_interface< onboarding >::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::onboarding::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 data

Friends And Related Function Documentation

◆ json_interface< onboarding >

friend struct json_interface< onboarding >
friend

Member Data Documentation

◆ default_channel_ids

std::vector<snowflake> dpp::onboarding::default_channel_ids

Channel IDs that members get opted into automatically.

◆ enabled

bool dpp::onboarding::enabled

Whether onboarding is enabled in the guild.

◆ guild_id

snowflake dpp::onboarding::guild_id

ID of the guild this onboarding is part of.

◆ mode

onboarding_mode dpp::onboarding::mode

Current mode of onboarding (defaults to dpp::gom_default)

◆ prompts

std::vector<onboarding_prompt> dpp::onboarding::prompts

Prompts shown during onboarding and in customize community.


The documentation for this struct was generated from the following files: