dpp::activity
presence.h
snowflake snowflake dpp::activity::application_id application_id dpp::activity::application_id

Creating application. e.g. a linked account on the user's client.

activity_assets activity_assets dpp::activity::assets assets dpp::activity::assets

Images for the presence and their hover texts.

std::vector< activity_button > std::vector<activity_button> dpp::activity::buttons buttons dpp::activity::buttons

The custom buttons shown in the Rich Presence (max 2).

time_t time_t dpp::activity::created_at created_at dpp::activity::created_at

Time activity was created.

std::string std::string dpp::activity::details details dpp::activity::details

What the player is currently doing.

dpp::emoji dpp::emoji dpp::activity::emoji emoji dpp::activity::emoji

The emoji used for the custom status.

time_t time_t dpp::activity::end end dpp::activity::end

End time. e.g. for songs on spotify.

uint8_t uint8_t dpp::activity::flags flags dpp::activity::flags

Flags bitmask from dpp::activity_flags.

bool bool dpp::activity::is_instance is_instance dpp::activity::is_instance

Whether or not the activity is an instanced game session.

std::string std::string dpp::activity::name name dpp::activity::name

Name of activity. e.g. "Fortnite", "Mr Boom's Firework Factory", etc.

activity_party activity_party dpp::activity::party party dpp::activity::party

Information of the current party if there is one.

activity_secrets activity_secrets dpp::activity::secrets secrets dpp::activity::secrets

Secrets for rich presence joining and spectating.

time_t time_t dpp::activity::start start dpp::activity::start

Start time. e.g. when game was started.

std::string std::string dpp::activity::state state dpp::activity::state

State of activity or the custom user status. e.g. "Waiting in lobby".

activity_type activity_type dpp::activity::type type dpp::activity::type

Activity type.

std::string std::string dpp::activity::url url dpp::activity::url

URL of activity (this is also named details).

Only applicable for certain sites such a YouTube

dpp::activity::activity
()
activity
dpp::activity::activity
dpp::activity::activity
(const activity_type typ, const std::string &nam, const std::string &stat, const std::string &url_)
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 std::string dpp::activity::get_large_asset_url (uint16_t size=0, const image_type format=i_png) const get_large_asset_url dpp::activity::get_large_asset_url uint16_t size 0 const image_type format i_png

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.

https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-asset-image

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 image url or an empty string, if required attributes are missing or an invalid format was passed

std::string std::string dpp::activity::get_small_asset_url (uint16_t size=0, const image_type format=i_png) const get_small_asset_url dpp::activity::get_small_asset_url uint16_t size 0 const image_type format i_png

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.

https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-asset-image

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 image url or an empty string, if required attributes are missing or an invalid format was passed

An activity is a representation of what a user is doing. It might be a game, or a website, or a movie. Whatever.

T
activity_type
bool
dpp::activity
details
name
state
url
assets
buttons
emoji
party
secrets
type
created_at
end
start
application_id
flags
is_instance
dpp::activity_assets
large_image
large_text
small_image
small_text
dpp::activity_button
label
url
dpp::activity_party
id
current_size
maximum_size
dpp::activity_secrets
join
match
spectate
dpp::emoji
name
roles
user_id
image_data
flags
dpp::json_interface< T >
dpp::json_interface< emoji >
< emoji >
dpp::managed
id
dpp::snowflake
value
dpp::utility::image_data
data
size
type
image_type
int32_t
std::basic_string< Char >
byte
std::string
std::unique_ptr< T >
ptr
std::unique_ptr< std::byte[]>
ptr
< std::byte[]>
std::vector< T >
elements
std::vector< dpp::activity_button >
elements
< dpp::activity_button >
std::vector< dpp::snowflake >
elements
< dpp::snowflake >
time_t
uint32_t
uint64_t
uint8_t
- dpp::activity
  activity
- dpp::activity
  activity
- dpp::activity
  application_id
- dpp::activity
  assets
- dpp::activity
  buttons
- dpp::activity
  created_at
- dpp::activity
  details
- dpp::activity
  emoji
- dpp::activity
  end
- dpp::activity
  flags
- dpp::activity
  get_large_asset_url
- dpp::activity
  get_small_asset_url
- dpp::activity
  is_instance
- dpp::activity
  name
- dpp::activity
  party
- dpp::activity
  secrets
- dpp::activity
  start
- dpp::activity
  state
- dpp::activity
  type
- dpp::activity
  url