![]()  | 
  
    D++ (DPP)
    
   C++ Discord API Bot Library 
   | 
 
An activity is a representation of what a user is doing. It might be a game, or a website, or a movie. Whatever. More...
#include <presence.h>
 Collaboration diagram for dpp::activity:Public Member Functions | |
| activity () | |
| activity (const activity_type typ, const std::string &nam, const std::string &stat, const std::string &url_) | |
| Construct a new activity.  More... | |
| std::string | get_large_asset_url (uint16_t size=0, const image_type format=i_png) const | 
| Get the assets large image url if they have one, otherwise returns an empty string. In case of prefixed image IDs (mp:{image_id}) it returns an empty string.  More... | |
| std::string | get_small_asset_url (uint16_t size=0, const image_type format=i_png) const | 
| Get the assets small image url if they have one, otherwise returns an empty string. In case of prefixed image IDs (mp:{image_id}) it returns an empty string.  More... | |
Public Attributes | |
| snowflake | application_id | 
| Creating application. e.g. a linked account on the user's client.  More... | |
| activity_assets | assets | 
| Images for the presence and their hover texts.  More... | |
| std::vector< activity_button > | buttons | 
| The custom buttons shown in the Rich Presence (max 2).  More... | |
| time_t | created_at | 
| Time activity was created.  More... | |
| std::string | details | 
| What the player is currently doing.  More... | |
| dpp::emoji | emoji | 
| The emoji used for the custom status.  More... | |
| time_t | end | 
| End time. e.g. for songs on spotify.  More... | |
| uint8_t | flags | 
| Flags bitmask from dpp::activity_flags.  More... | |
| bool | is_instance | 
| Whether or not the activity is an instanced game session.  More... | |
| std::string | name | 
| Name of activity. e.g. "Fortnite", "Mr Boom's Firework Factory", etc.  More... | |
| activity_party | party | 
| Information of the current party if there is one.  More... | |
| activity_secrets | secrets | 
| Secrets for rich presence joining and spectating.  More... | |
| time_t | start | 
| Start time. e.g. when game was started.  More... | |
| std::string | state | 
| State of activity or the custom user status. e.g. "Waiting in lobby".  More... | |
| activity_type | type | 
| Activity type.  More... | |
| std::string | url | 
| URL of activity (this is also named details).  More... | |
An activity is a representation of what a user is doing. It might be a game, or a website, or a movie. Whatever.
| dpp::activity::activity | ( | ) | 
| dpp::activity::activity | ( | const activity_type | typ, | 
| const std::string & | nam, | ||
| const std::string & | stat, | ||
| const std::string & | url_ | ||
| ) | 
Construct a new activity.
| typ | activity type | 
| nam | Name of the activity | 
| stat | State of the activity | 
| url_ | url of the activity, only works for certain sites, such as YouTube | 
| std::string dpp::activity::get_large_asset_url | ( | uint16_t | size = 0,  | 
        
| const image_type | format = i_png  | 
        ||
| ) | const | 
Get the assets large image url if they have one, otherwise returns an empty string. In case of prefixed image IDs (mp:{image_id}) it returns an empty string.
| size | The size of the image in pixels. It can be any power of two between 16 and 4096, otherwise the default sized image is returned. | 
| format | The format to use for the avatar. It can be one of i_webp, i_jpg or i_png.  | 
| std::string dpp::activity::get_small_asset_url | ( | uint16_t | size = 0,  | 
        
| const image_type | format = i_png  | 
        ||
| ) | const | 
Get the assets small image url if they have one, otherwise returns an empty string. In case of prefixed image IDs (mp:{image_id}) it returns an empty string.
| size | The size of the image in pixels. It can be any power of two between 16 and 4096, otherwise the default sized image is returned. | 
| format | The format to use for the avatar. It can be one of i_webp, i_jpg or i_png.  | 
| snowflake dpp::activity::application_id | 
Creating application. e.g. a linked account on the user's client.
| activity_assets dpp::activity::assets | 
Images for the presence and their hover texts.
| std::vector<activity_button> dpp::activity::buttons | 
The custom buttons shown in the Rich Presence (max 2).
| time_t dpp::activity::created_at | 
Time activity was created.
| std::string dpp::activity::details | 
What the player is currently doing.
| dpp::emoji dpp::activity::emoji | 
The emoji used for the custom status.
| time_t dpp::activity::end | 
End time. e.g. for songs on spotify.
| uint8_t dpp::activity::flags | 
Flags bitmask from dpp::activity_flags.
| bool dpp::activity::is_instance | 
Whether or not the activity is an instanced game session.
| std::string dpp::activity::name | 
Name of activity. e.g. "Fortnite", "Mr Boom's Firework Factory", etc.
| activity_party dpp::activity::party | 
Information of the current party if there is one.
| activity_secrets dpp::activity::secrets | 
Secrets for rich presence joining and spectating.
| time_t dpp::activity::start | 
Start time. e.g. when game was started.
| std::string dpp::activity::state | 
State of activity or the custom user status. e.g. "Waiting in lobby".
| activity_type dpp::activity::type | 
Activity type.
| std::string dpp::activity::url | 
URL of activity (this is also named details).