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

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

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

`#include <guild.h>`

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

## Public Member Functions

| onboarding ()
| Construct a new onboarding object.
virtual | ~onboarding ()=default
| Destroy the onboarding object.
std::string | build_json (bool with_id=false) const
| Convert object to json string.
onboarding & | fill_from_json (nlohmann::json *j)
| Convert object from nlohmann::json.
onboarding & | set_enabled (const bool is_enabled)
| Set the enabling of this onboarding object.
onboarding & | set_guild_id (const snowflake id)
| Set guild_id of this onboarding object.
onboarding & | set_mode (const onboarding_mode m)
| Set the mode of this onboarding object.
auto | to_json (bool with_id=false) const
| Convert object to nlohmann::json.

## Public Attributes

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

## Protected Member Functions

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

virtual default

Destroy the onboarding object.

## Member Function Documentation

## ◆ build_json()

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

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

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

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

Set the enabling of this onboarding object.

Parameters

  is_enabled | bool 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

  id | Guild 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

  m | onboarding_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

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::onboarding::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 data

## Friends And Related Symbol 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.

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