D++ (DPP)
C++ Discord API Bot Library
dpp::application Class Reference

The application class represents details of a bot application. More...

#include <application.h>

+ Inheritance diagram for dpp::application:
+ Collaboration diagram for dpp::application:

Public Member Functions

 application ()
 
 ~application ()
 
applicationfill_from_json (nlohmann::json *j)
 
double get_creation_time () const
 Get the creation time of this object according to Discord. More...
 
applicationparse_from_json (nlohmann::json *j)
 Convert object from nlohmann::json. More...
 
virtual std::string build_json (bool with_id=false) const
 Build JSON string from the object. More...
 

Public Attributes

std::string name
 the name of the app More...
 
utility::iconhash icon
 the icon hash of the app (may be empty) More...
 
std::string description
 the description of the app More...
 
std::string rpc_origins
 Optional: an array of rpc origin urls, if rpc is enabled. More...
 
bool bot_public
 when false only app owner can join the app's bot to guilds More...
 
bool bot_require_code_grant
 when true the app's bot will only join upon completion of the full oauth2 code grant flow More...
 
std::string terms_of_service_url
 Optional: the url of the app's terms of service. More...
 
std::string privacy_policy_url
 Optional: the url of the app's privacy policy. More...
 
user owner
 Optional: partial user object containing info on the owner of the application. More...
 
std::string summary
 if this application is a game sold on Discord, this field will be the summary field for the store page of its primary sku More...
 
std::string verify_key
 the hex encoded key for verification in interactions and the GameSDK's GetTicket More...
 
app_team team
 if the application belongs to a team, this will be a list of the members of that team (may be empty) More...
 
snowflake guild_id
 Optional: if this application is a game sold on Discord, this field will be the guild to which it has been linked. More...
 
snowflake primary_sku_id
 Optional: if this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists. More...
 
std::string slug
 Optional: if this application is a game sold on Discord, this field will be the URL slug that links to the store page. More...
 
utility::iconhash cover_image
 Optional: the application's default rich presence invite cover image hash. More...
 
uint32_t flags
 Optional: the application's public flags. More...
 
snowflake id
 Unique ID of object set by Discord. This value contains a timestamp, worker ID, internal server ID, and an incrementing value. Only the timestamp is relevant to us as useful metadata. More...
 

Detailed Description

The application class represents details of a bot application.

Constructor & Destructor Documentation

◆ application()

dpp::application::application ( )

Constructor

◆ ~application()

dpp::application::~application ( )

Destructor

Member Function Documentation

◆ build_json()

virtual std::string dpp::json_interface< application >::build_json ( bool  with_id = false) const
inlinevirtualinherited

Build JSON string from the object.

Parameters
with_idInclude the ID in the JSON
Returns
std::string JSON string version of object

◆ fill_from_json()

application & dpp::application::fill_from_json ( nlohmann::json *  j)

Read class values from json object

Parameters
jA json object to read from
Returns
A reference to self

◆ get_creation_time()

double dpp::managed::get_creation_time ( ) const
inherited

Get the creation time of this object according to Discord.

Returns
double creation time inferred from the snowflake ID. The minimum possible value is the first second of 2015.

◆ parse_from_json()

application & dpp::json_interface< application >::parse_from_json ( nlohmann::json *  j)
inlineinherited

Convert object from nlohmann::json.

Parameters
jnlohmann::json object
Returns
T& Reference to self for fluent calling

Member Data Documentation

◆ bot_public

bool dpp::application::bot_public

when false only app owner can join the app's bot to guilds

◆ bot_require_code_grant

bool dpp::application::bot_require_code_grant

when true the app's bot will only join upon completion of the full oauth2 code grant flow

◆ cover_image

utility::iconhash dpp::application::cover_image

Optional: the application's default rich presence invite cover image hash.

◆ description

std::string dpp::application::description

the description of the app

◆ flags

uint32_t dpp::application::flags

Optional: the application's public flags.

◆ guild_id

snowflake dpp::application::guild_id

Optional: if this application is a game sold on Discord, this field will be the guild to which it has been linked.

◆ icon

utility::iconhash dpp::application::icon

the icon hash of the app (may be empty)

◆ id

snowflake dpp::managed::id
inherited

Unique ID of object set by Discord. This value contains a timestamp, worker ID, internal server ID, and an incrementing value. Only the timestamp is relevant to us as useful metadata.

◆ name

std::string dpp::application::name

the name of the app

◆ owner

user dpp::application::owner

Optional: partial user object containing info on the owner of the application.

◆ primary_sku_id

snowflake dpp::application::primary_sku_id

Optional: if this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists.

◆ privacy_policy_url

std::string dpp::application::privacy_policy_url

Optional: the url of the app's privacy policy.

◆ rpc_origins

std::string dpp::application::rpc_origins

Optional: an array of rpc origin urls, if rpc is enabled.

◆ slug

std::string dpp::application::slug

Optional: if this application is a game sold on Discord, this field will be the URL slug that links to the store page.

◆ summary

std::string dpp::application::summary

if this application is a game sold on Discord, this field will be the summary field for the store page of its primary sku

◆ team

app_team dpp::application::team

if the application belongs to a team, this will be a list of the members of that team (may be empty)

◆ terms_of_service_url

std::string dpp::application::terms_of_service_url

Optional: the url of the app's terms of service.

◆ verify_key

std::string dpp::application::verify_key

the hex encoded key for verification in interactions and the GameSDK's GetTicket

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