![]() |
D++ (DPP)
C++ Discord API Bot Library
|
The application class represents details of a bot application. More...
Inheritance diagram for dpp::application:
Collaboration diagram for dpp::application:Public Member Functions | |
| application () | |
| ~application () | |
| std::string | get_cover_image_url (uint16_t size=0, const image_type format=i_png) const |
| Get the application's cover image url if they have one, otherwise returns an empty string. More... | |
| std::string | get_icon_url (uint16_t size=0, const image_type format=i_png) const |
| Get the application's icon url if they have one, otherwise returns an empty string. More... | |
| constexpr double | get_creation_time () const noexcept |
| Get the creation time of this object according to Discord. More... | |
| constexpr bool | operator== (const managed &other) const noexcept |
| Comparison operator for comparing two managed objects by id. More... | |
| constexpr bool | operator!= (const managed &other) const noexcept |
| Comparison operator for comparing two managed objects by id. More... | |
| application & | fill_from_json (nlohmann::json *j) |
| Convert object from nlohmann::json. More... | |
| auto | to_json (bool with_id=false) const |
| Convert object to nlohmann::json. More... | |
| std::string | build_json (bool with_id=false) const |
| Convert object to json string. 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::vector< std::string > | rpc_origins |
| Optional: an array of rpc origin urls, if rpc is enabled. More... | |
| bool | bot_public |
| When false, only app owner add the 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... | |
| user | bot |
| Optional: Partial user object for the bot user associated with the app. 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... | |
| guild | guild_obj |
| Partial object of the associated guild. 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... | |
| uint64_t | approximate_guild_count |
| Optional: Approximate count of guilds the app has been added to. More... | |
| std::vector< std::string > | redirect_uris |
| Optional: Array of redirect URIs for the app. More... | |
| std::string | interactions_endpoint_url |
| Optional: Interactions endpoint URL for the app. More... | |
| std::string | role_connections_verification_url |
| The application's role connection verification entry point which, when configured, will render the app as a verification method in the guild role verification configuration. More... | |
| std::vector< std::string > | tags |
| Up to 5 tags describing the content and functionality of the application. More... | |
| application_install_params | install_params |
| Settings for the application's default in-app authorization link, if enabled. More... | |
| std::string | custom_install_url |
| The application's default custom authorization link, if enabled. More... | |
| uint8_t | discoverability_state |
| uint32_t | discovery_eligibility_flags |
| uint8_t | explicit_content_filter |
| uint8_t | creator_monetization_state |
| bool | integration_public |
| bool | integration_require_code_grant |
| std::vector< std::string > | interactions_event_types |
| uint8_t | interactions_version |
| bool | is_monetized |
| uint32_t | monetization_eligibility_flags |
| uint8_t | monetization_state |
| bool | hook |
| uint8_t | rpc_application_state |
| uint8_t | store_application_state |
| uint8_t | verification_state |
| 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... | |
Protected Member Functions | |
| application & | fill_from_json_impl (nlohmann::json *j) |
Friends | |
| struct | json_interface< application > |
The application class represents details of a bot application.
| dpp::application::application | ( | ) |
Constructor
| dpp::application::~application | ( | ) |
Destructor
|
inlineinherited |
Convert object to json string.
| with_id | Whether to include the ID or not |
|
inlineinherited |
Convert object from nlohmann::json.
| j | nlohmann::json object |
|
protected |
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 image_type | format = i_png |
||
| ) | const |
Get the application's 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, otherwise the default sized cover image is returned. |
| format | The format to use for the avatar. It can be one of i_webp, i_jpg or i_png. |
|
inlineconstexprnoexceptinherited |
Get the creation time of this object according to Discord.
| std::string dpp::application::get_icon_url | ( | uint16_t | size = 0, |
| const image_type | format = i_png |
||
| ) | const |
Get the application's 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, otherwise the default sized icon is returned. |
| format | The format to use for the avatar. It can be one of i_webp, i_jpg or i_png. |
|
inlineconstexprnoexceptinherited |
Comparison operator for comparing two managed objects by id.
| other | Other object to compare against |
|
inlineconstexprnoexceptinherited |
Comparison operator for comparing two managed objects by id.
| other | Other object to compare against |
|
inlineinherited |
Convert object to nlohmann::json.
| with_id | Whether to include the ID or not |
|
friend |
| uint64_t dpp::application::approximate_guild_count |
Optional: Approximate count of guilds the app has been added to.
| user dpp::application::bot |
Optional: Partial user object for the bot user associated with the app.
| bool dpp::application::bot_public |
When false, only app owner add the 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.
| uint8_t dpp::application::creator_monetization_state |
| 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.
| uint8_t dpp::application::discoverability_state |
| uint32_t dpp::application::discovery_eligibility_flags |
| uint8_t dpp::application::explicit_content_filter |
| 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.
| guild dpp::application::guild_obj |
Partial object of the associated guild.
| bool dpp::application::hook |
| 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.
| bool dpp::application::integration_public |
| bool dpp::application::integration_require_code_grant |
| std::string dpp::application::interactions_endpoint_url |
Optional: Interactions endpoint URL for the app.
| std::vector<std::string> dpp::application::interactions_event_types |
| uint8_t dpp::application::interactions_version |
| bool dpp::application::is_monetized |
| uint32_t dpp::application::monetization_eligibility_flags |
| uint8_t dpp::application::monetization_state |
| 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::vector<std::string> dpp::application::redirect_uris |
Optional: Array of redirect URIs for the app.
| std::string dpp::application::role_connections_verification_url |
The application's role connection verification entry point which, when configured, will render the app as a verification method in the guild role verification configuration.
| uint8_t dpp::application::rpc_application_state |
| std::vector<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.
| uint8_t dpp::application::store_application_state |
| 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.
| uint8_t dpp::application::verification_state |
| std::string dpp::application::verify_key |
The hex encoded key for verification in interactions and the GameSDK's GetTicket.