dpp::scheduled_event
dpp::managed
dpp::json_interface< scheduled_event >
scheduled_event.h
struct friend struct json_interface< scheduled_event > json_interface< scheduled_event > dpp::scheduled_event::json_interface< scheduled_event > json_interface< scheduled_event >
snowflake snowflake dpp::scheduled_event::channel_id channel_id dpp::scheduled_event::channel_id

The channel ID in which the scheduled event will be hosted, or null if scheduled entity type is EXTERNAL.

This may be empty.

user user dpp::scheduled_event::creator creator dpp::scheduled_event::creator

Optional: The creator of the scheduled event.

snowflake snowflake dpp::scheduled_event::creator_id creator_id dpp::scheduled_event::creator_id

Optional: The ID of the user that created the scheduled event.

std::string std::string dpp::scheduled_event::description description dpp::scheduled_event::description

Optional: The description of the scheduled event (1-1000 characters).

snowflake snowflake dpp::scheduled_event::entity_id entity_id dpp::scheduled_event::entity_id

Any additional ID of the hosting entity associated with event. e.g. stage instance ID.

This may be empty.

event_entities event_entities dpp::scheduled_event::entity_metadata entity_metadata dpp::scheduled_event::entity_metadata

The entity metadata for the scheduled event.

This may be empty.

event_entity_type event_entity_type dpp::scheduled_event::entity_type entity_type dpp::scheduled_event::entity_type

The type of hosting entity associated with a scheduled event. e.g. voice channel or stage channel.

snowflake snowflake dpp::scheduled_event::guild_id guild_id dpp::scheduled_event::guild_id

The guild ID which the scheduled event belongs to.

snowflake snowflake dpp::managed::id id dpp::managed::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.

utility::icon utility::icon dpp::scheduled_event::image image dpp::scheduled_event::image

The image of the scheduled event.

This may be empty.

std::string std::string dpp::scheduled_event::name name dpp::scheduled_event::name

The name of the scheduled event.

event_privacy_level event_privacy_level dpp::scheduled_event::privacy_level privacy_level dpp::scheduled_event::privacy_level

The privacy level of the scheduled event.

time_t time_t dpp::scheduled_event::scheduled_end_time scheduled_end_time dpp::scheduled_event::scheduled_end_time

The time the scheduled event will end, or null if the event does not have a scheduled time to end.

This may be empty.

time_t time_t dpp::scheduled_event::scheduled_start_time scheduled_start_time dpp::scheduled_event::scheduled_start_time

The time the scheduled event will start.

event_status event_status dpp::scheduled_event::status status dpp::scheduled_event::status

The status of the scheduled event.

uint32_t uint32_t dpp::scheduled_event::user_count user_count dpp::scheduled_event::user_count

Optional: The number of users subscribed to the scheduled event.

scheduled_event & scheduled_event & dpp::scheduled_event::fill_from_json_impl (const nlohmann::json *j) fill_from_json_impl dpp::scheduled_event::fill_from_json_impl const nlohmann::json * j

Serialise a scheduled_event object from json.

scheduled_event& a reference to self

json json dpp::scheduled_event::to_json_impl (bool with_id=false) const to_json_impl dpp::scheduled_event::to_json_impl bool with_id false

Build json for this object.

with_id

Include id field in json

std::string Json of this object

dpp::scheduled_event::scheduled_event
()
scheduled_event
dpp::scheduled_event::scheduled_event

Create a scheduled_event object.

std::string std::string dpp::json_interface< scheduled_event >::build_json (bool with_id=false) const build_json dpp::json_interface< scheduled_event >::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

scheduled_event & scheduled_event & dpp::scheduled_event::clear_description () clear_description dpp::scheduled_event::clear_description

Clear the description of the event.

scheduled_event& reference to self

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

Convert object from nlohmann::json.

j

nlohmann::json object

T& Reference to self for fluent calling

double double dpp::managed::get_creation_time () const noexcept get_creation_time dpp::managed::get_creation_time

Get the creation time of this object according to Discord.

double creation time inferred from the snowflake ID. The minimum possible value is the first second of 2015.

scheduled_event & scheduled_event & dpp::scheduled_event::load_image (const std::byte *data, uint32_t size, const image_type type) load_image dpp::scheduled_event::load_image const std::byte * data uint32_t size const image_type type

Load an image for the event cover.

data

Image binary data

size

Size of the image.

type

Type of image. It can be one of `i_gif`, `i_jpg` or `i_png`.

emoji& Reference to self

scheduled_event & scheduled_event & dpp::scheduled_event::load_image (std::string_view image_blob, const image_type type) load_image dpp::scheduled_event::load_image std::string_view image_blob const image_type type

Load an image for the event cover.

image_blob

Image binary data

type

Type of image. It can be one of `i_gif`, `i_jpg` or `i_png`.

emoji& Reference to self

bool bool dpp::managed::operator!= (const managed &other) const noexcept operator!= dpp::managed::operator!= const managed & other

Comparison operator for comparing two managed objects by id.

other

Other object to compare against

true objects are not the same id

false objects are the same id

bool bool dpp::managed::operator== (const managed &other) const noexcept operator== dpp::managed::operator== const managed & other

Comparison operator for comparing two managed objects by id.

other

Other object to compare against

true objects are the same id

false objects are not the same id

scheduled_event & scheduled_event & dpp::scheduled_event::set_channel_id (snowflake c) set_channel_id dpp::scheduled_event::set_channel_id snowflake c

Set the voice channel id of the event.

clears location

c

channel ID

scheduled_event& reference to self

scheduled_event & scheduled_event & dpp::scheduled_event::set_creator_id (snowflake c) set_creator_id dpp::scheduled_event::set_creator_id snowflake c

Set the creator id of the event.

c

creator user ID

scheduled_event& reference to self

scheduled_event & scheduled_event & dpp::scheduled_event::set_description (const std::string &d) set_description dpp::scheduled_event::set_description const std::string & d

Set the description of the event. Minimum length: 1 (if set), Maximum length: 100.

d

event description

scheduled_event& reference to self

dpp::length_error

if length < 1

scheduled_event & scheduled_event & dpp::scheduled_event::set_end_time (time_t t) set_end_time dpp::scheduled_event::set_end_time time_t t

Set the end time of the event.

t

ending time

scheduled_event& reference to self

dpp::length_error

if time is before now

scheduled_event & scheduled_event & dpp::scheduled_event::set_location (const std::string &l) set_location dpp::scheduled_event::set_location const std::string & l

Set the location of the event. Minimum length: 1, Maximum length: 1000.

Clears channel_id

l

event location

scheduled_event& reference to self

dpp::length_error

if length < 1

scheduled_event & scheduled_event & dpp::scheduled_event::set_name (const std::string &n) set_name dpp::scheduled_event::set_name const std::string & n

Set the name of the event. Minimum length: 1, Maximum length: 100.

n

event name

scheduled_event& reference to self

dpp::length_error

if length < 1

scheduled_event & scheduled_event & dpp::scheduled_event::set_start_time (time_t t) set_start_time dpp::scheduled_event::set_start_time time_t t

Set the start time of the event.

t

starting time

scheduled_event& reference to self

dpp::length_error

if time is before now

scheduled_event & scheduled_event & dpp::scheduled_event::set_status (event_status s) set_status dpp::scheduled_event::set_status event_status s

Set the status of the event.

s

status to set

scheduled_event& reference to self

dpp::logic_exception

if status change is not valid

auto auto dpp::json_interface< scheduled_event >::to_json (bool with_id=false) const to_json dpp::json_interface< scheduled_event >::to_json bool with_id false

Convert object to nlohmann::json.

with_id

Whether to include the ID or not

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

json Json built from the structure

A scheduled event.

dpp::json_interface< T >
dpp::json_interface< scheduled_event >
< scheduled_event >
dpp::managed
dpp::scheduled_event
bool
dpp::event_entities
location
dpp::json_interface< T >
dpp::json_interface< scheduled_event >
< scheduled_event >
dpp::json_interface< user >
< user >
dpp::managed
id
dpp::scheduled_event
channel_id
creator_id
entity_id
guild_id
description
name
image
scheduled_end_time
scheduled_start_time
privacy_level
status
entity_type
entity_metadata
creator
user_count
dpp::snowflake
value
dpp::user
global_name
username
avatar
avatar_decoration
primary_guild
flags
discriminator
refcount
dpp::utility::icon
hash_or_data
dpp::utility::iconhash
first
second
dpp::utility::primaryguild
id
enabled
tag
badge
event_entity_type
event_privacy_level
event_status
std::basic_string< Char >
std::string
variant< std::monostate, dpp::utility::iconhash, dpp::utility::image_data >
time_t
uint16_t
uint32_t
uint64_t
uint8_t
- dpp::scheduled_event
  build_json
- dpp::scheduled_event
  channel_id
- dpp::scheduled_event
  clear_description
- dpp::scheduled_event
  creator
- dpp::scheduled_event
  creator_id
- dpp::scheduled_event
  description
- dpp::scheduled_event
  entity_id
- dpp::scheduled_event
  entity_metadata
- dpp::scheduled_event
  entity_type
- dpp::scheduled_event
  fill_from_json
- dpp::scheduled_event
  fill_from_json_impl
- dpp::scheduled_event
  get_creation_time
- dpp::scheduled_event
  guild_id
- dpp::scheduled_event
  id
- dpp::scheduled_event
  image
- dpp::scheduled_event
  json_interface< scheduled_event >
- dpp::scheduled_event
  load_image
- dpp::scheduled_event
  load_image
- dpp::scheduled_event
  managed
- dpp::scheduled_event
  managed
- dpp::scheduled_event
  managed
- dpp::scheduled_event
  managed
- dpp::scheduled_event
  name
- dpp::scheduled_event
  operator!=
- dpp::scheduled_event
  operator=
- dpp::scheduled_event
  operator=
- dpp::scheduled_event
  operator==
- dpp::scheduled_event
  privacy_level
- dpp::scheduled_event
  scheduled_end_time
- dpp::scheduled_event
  scheduled_event
- dpp::scheduled_event
  scheduled_start_time
- dpp::scheduled_event
  set_channel_id
- dpp::scheduled_event
  set_creator_id
- dpp::scheduled_event
  set_description
- dpp::scheduled_event
  set_end_time
- dpp::scheduled_event
  set_location
- dpp::scheduled_event
  set_name
- dpp::scheduled_event
  set_start_time
- dpp::scheduled_event
  set_status
- dpp::scheduled_event
  status
- dpp::scheduled_event
  to_json
- dpp::scheduled_event
  to_json_impl
- dpp::scheduled_event
  user_count
- dpp::scheduled_event
  ~managed