![]() |
D++ (DPP)
C++ Discord API Bot Library
|
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 () | |
| virtual std::string | build_json (bool with_id=false) const |
| Build JSON string from the object. More... | |
| application & | fill_from_json (nlohmann::json *j) |
| std::string | get_cover_image_url (uint16_t size=0) const |
| Get the applications cover image url if they have one, otherwise returns an empty string. More... | |
| double | get_creation_time () const |
| Get the creation time of this object according to Discord. More... | |
| std::string | get_icon_url (uint16_t size=0) const |
| Get the applications icon url if they have one, otherwise returns an empty string. More... | |
| bool | operator!= (const managed &other) const noexcept |
| Comparison operator for comparing two managed objects by id. More... | |
| bool | operator== (const managed &other) const noexcept |
| Comparison operator for comparing two managed objects by id. More... | |
Public Attributes | |
| 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... | |
| utility::iconhash | cover_image |
| Optional: the application's default rich presence invite cover image hash. More... | |
| std::string | custom_install_url |
| The application's default custom authorization link, if enabled. More... | |
| std::string | description |
| the description of the app More... | |
| uint32_t | flags |
| Optional: the application's public flags. 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... | |
| utility::iconhash | icon |
| the icon hash of the app (may be empty) 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... | |
| application_install_params | install_params |
| Settings for the application's default in-app authorization link, if enabled. More... | |
| std::string | name |
| the name of the app More... | |
| user | owner |
| Optional: partial user object containing info on the owner of the application. 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 | privacy_policy_url |
| Optional: the url of the app's privacy policy. More... | |
| std::string | rpc_origins |
| Optional: an array of rpc origin urls, if rpc is enabled. 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... | |
| 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::vector< std::string > | tags |
| Up to 5 tags describing the content and functionality of the application. 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... | |
| std::string | terms_of_service_url |
| Optional: the url of the app's terms of service. More... | |
| std::string | verify_key |
| the hex encoded key for verification in interactions and the GameSDK's GetTicket More... | |
The application class represents details of a bot application.
| dpp::application::application | ( | ) |
Constructor
| dpp::application::~application | ( | ) |
Destructor
|
inlinevirtualinherited |
Build JSON string from the object.
| with_id | Include the ID in the JSON |
| application & dpp::application::fill_from_json | ( | nlohmann::json * | j | ) |
Read class values from json object
| j | A json object to read from |
| std::string dpp::application::get_cover_image_url | ( | uint16_t | size = 0 | ) | const |
Get the applications cover image url if they have one, otherwise returns an empty string.
| size | The size of the cover image in pixels. It can be any power of two between 16 and 4096. if not specified, the default sized cover image is returned. |
|
inherited |
Get the creation time of this object according to Discord.
| std::string dpp::application::get_icon_url | ( | uint16_t | size = 0 | ) | const |
Get the applications icon url if they have one, otherwise returns an empty string.
| size | The size of the icon in pixels. It can be any power of two between 16 and 4096. if not specified, the default sized icon is returned. |
|
noexceptinherited |
Comparison operator for comparing two managed objects by id.
| other | Other object to compare against |
|
noexceptinherited |
Comparison operator for comparing two managed objects by id.
| other | Other object to compare against |
| bool dpp::application::bot_public |
when false only app owner can join the app's bot to guilds
| 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
| utility::iconhash dpp::application::cover_image |
Optional: the application's default rich presence invite cover image hash.
| std::string dpp::application::custom_install_url |
The application's default custom authorization link, if enabled.
| std::string dpp::application::description |
the description of the app
| uint32_t dpp::application::flags |
Optional: the application's public flags.
| 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.
| utility::iconhash dpp::application::icon |
the icon hash of the app (may be empty)
|
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.
| application_install_params dpp::application::install_params |
Settings for the application's default in-app authorization link, if enabled.
| std::string dpp::application::name |
the name of the app
| user dpp::application::owner |
Optional: partial user object containing info on the owner of the application.
| 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.
| std::string dpp::application::privacy_policy_url |
Optional: the url of the app's privacy policy.
| std::string dpp::application::rpc_origins |
Optional: an array of rpc origin urls, if rpc is enabled.
| 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.
| 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
| std::vector<std::string> dpp::application::tags |
Up to 5 tags describing the content and functionality of the application.
| 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)
| std::string dpp::application::terms_of_service_url |
Optional: the url of the app's terms of service.
| std::string dpp::application::verify_key |
the hex encoded key for verification in interactions and the GameSDK's GetTicket