dpp::presence
dpp::json_interface< presence >
presence.h
struct friend struct json_interface< presence > json_interface< presence > dpp::presence::json_interface< presence > json_interface< presence >
std::vector< activity > std::vector<activity> dpp::presence::activities activities dpp::presence::activities

List of activities.

uint8_t uint8_t dpp::presence::flags flags dpp::presence::flags

Flags bitmask containing dpp::presence_flags.

snowflake snowflake dpp::presence::guild_id guild_id dpp::presence::guild_id

Guild ID.

Apparently, Discord supports this internally, but the client doesn't...

snowflake snowflake dpp::presence::user_id user_id dpp::presence::user_id

The user the presence applies to.

presence & presence & dpp::presence::fill_from_json_impl (nlohmann::json *j) fill_from_json_impl dpp::presence::fill_from_json_impl nlohmann::json * j

Fill this object from json. j

JSON object to fill from

A reference to self

json virtual json dpp::presence::to_json_impl (bool with_id=false) const to_json_impl dpp::presence::to_json_impl bool with_id false

Build JSON from this object.

This excludes any part of the presence object that are not valid for websockets and bots, and includes websocket opcode 3. You will not get what you expect if you call this on a user's presence received from on_presence_update or on_guild_create!

with_id

Add ID to output

The JSON text of the presence

dpp::presence::presence
()
presence
dpp::presence::presence

Constructor

dpp::presence::presence
(presence_status status, activity_type type, const std::string &activity_description)
presence
dpp::presence::presence
presence_status status
activity_type type
const std::string & activity_description

Construct a new presence object with some parameters for sending to a websocket.

status

Status of the activity

type

Type of activity

activity_description

Description of the activity

dpp::presence::presence
(presence_status status, const activity &a)
presence
dpp::presence::presence
presence_status status
const activity & a

Construct a new presence object with some parameters for sending to a websocket.

status

Status of the activity

a

Activity itself

dpp::presence::~presence
()
~presence
dpp::presence::~presence

Destructor

std::string std::string dpp::json_interface< presence >::build_json (bool with_id=false) const build_json dpp::json_interface< presence >::build_json bool with_id false

Convert object to json string.

with_id

Whether to include the ID or not

Some fields are conditionally filled, do not rely on all fields being present

std::string Json built from the structure

presence_status presence_status dpp::presence::desktop_status () const desktop_status dpp::presence::desktop_status

The users status on desktop.

The user's status on desktop

presence & presence & dpp::json_interface< presence >::fill_from_json (nlohmann::json *j) fill_from_json dpp::json_interface< presence >::fill_from_json nlohmann::json * j

Convert object from nlohmann::json.

j

nlohmann::json object

T& Reference to self for fluent calling

presence_status presence_status dpp::presence::mobile_status () const mobile_status dpp::presence::mobile_status

The user's status on mobile.

The user's status on mobile

presence_status presence_status dpp::presence::status () const status dpp::presence::status

The user's status as shown to other users.

The user's status as shown to other users

json json dpp::presence::to_json (bool with_id=false) const to_json dpp::presence::to_json bool with_id false

Build JSON from this object.

This excludes any part of the presence object that are not valid for websockets and bots, and includes websocket opcode 3. You will not get what you expect if you call this on a user's presence received from on_presence_update or on_guild_create!

with_id

Add ID to output

The JSON of the presence

presence_status presence_status dpp::presence::web_status () const web_status dpp::presence::web_status

The user's status on web.

The user's status on web

Represents user presence, e.g. what game they are playing and if they are online.

dpp::json_interface< T >
dpp::json_interface< presence >
< presence >
dpp::presence
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::json_interface< presence >
< presence >
dpp::managed
id
dpp::presence
guild_id
user_id
flags
activities
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 >
elements
< dpp::activity >
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::presence
  activities
- dpp::presence
  build_json
- dpp::presence
  desktop_status
- dpp::presence
  fill_from_json
- dpp::presence
  fill_from_json_impl
- dpp::presence
  flags
- dpp::presence
  guild_id
- dpp::presence
  json_interface< presence >
- dpp::presence
  mobile_status
- dpp::presence
  presence
- dpp::presence
  presence
- dpp::presence
  presence
- dpp::presence
  status
- dpp::presence
  to_json
- dpp::presence
  to_json_impl
- dpp::presence
  user_id
- dpp::presence
  web_status
- dpp::presence
  ~presence