A scheduled event.
More...
#include <scheduled_event.h>
◆ scheduled_event()
dpp::scheduled_event::scheduled_event |
( |
| ) |
|
◆ ~scheduled_event()
dpp::scheduled_event::~scheduled_event |
( |
| ) |
|
|
default |
◆ build_json()
virtual std::string const dpp::scheduled_event::build_json |
( |
bool |
with_id = false | ) |
const |
|
virtual |
Build json for this object.
- Parameters
-
with_id | Include id field in json |
- Returns
- std::string Dumped json of this object
◆ clear_description()
Clear the description of the event.
- Returns
- scheduled_event& reference to self
◆ fill_from_json()
scheduled_event & dpp::scheduled_event::fill_from_json |
( |
const nlohmann::json * |
j | ) |
|
◆ get_creation_time()
double dpp::managed::get_creation_time |
( |
| ) |
const |
|
inherited |
Get the creation time of this object according to Discord.
- Returns
- double creation time inferred from the snowflake ID. The minimum possible value is the first second of 2015.
◆ operator!=()
bool dpp::managed::operator!= |
( |
const managed & |
other | ) |
const |
|
noexceptinherited |
Comparison operator for comparing two managed objects by id.
- Parameters
-
other | Other object to compare against |
- Returns
- true objects are not the same id
-
false objects are the same id
◆ operator==()
bool dpp::managed::operator== |
( |
const managed & |
other | ) |
const |
|
noexceptinherited |
Comparison operator for comparing two managed objects by id.
- Parameters
-
other | Other object to compare against |
- Returns
- true objects are the same id
-
false objects are not the same id
◆ set_channel_id()
Set the voice channel id of the event.
- Note
- clears location
- Parameters
-
- Returns
- scheduled_event& reference to self
◆ set_creator_id()
Set the creator id of the event.
- Parameters
-
- Returns
- scheduled_event& reference to self
◆ set_description()
scheduled_event & dpp::scheduled_event::set_description |
( |
const std::string & |
d | ) |
|
Set the description of the event Minimum length: 1 (if set), Maximum length: 100.
- Parameters
-
- Returns
- scheduled_event& reference to self
- Exceptions
-
dpp::length_error | if length < 1 |
◆ set_end_time()
Set the end time of the event.
- Parameters
-
- Returns
- scheduled_event& reference to self
- Exceptions
-
dpp::length_error | if time is before now |
◆ set_location()
scheduled_event & dpp::scheduled_event::set_location |
( |
const std::string & |
l | ) |
|
Set the location of the event. Minimum length: 1, Maximum length: 1000.
- Note
- Clears channel_id
- Parameters
-
- Returns
- scheduled_event& reference to self
- Exceptions
-
dpp::length_error | if length < 1 |
◆ set_name()
Set the name of the event Minimum length: 1, Maximum length: 100.
- Parameters
-
- Returns
- scheduled_event& reference to self
- Exceptions
-
dpp::length_error | if length < 1 |
◆ set_start_time()
Set the start time of the event.
- Parameters
-
- Returns
- scheduled_event& reference to self
- Exceptions
-
dpp::length_error | if time is before now |
◆ set_status()
Set the status of the event.
- Parameters
-
- Returns
- scheduled_event& reference to self
- Exceptions
-
dpp::logic_error | if status change is not valid |
◆ channel_id
the channel id in which the scheduled event will be hosted, or null if scheduled entity type is EXTERNAL (may be empty)
◆ creator
user dpp::scheduled_event::creator |
Optional: the creator of the scheduled event.
◆ creator_id
Optional: the id of the user that created the scheduled event.
◆ description
std::string dpp::scheduled_event::description |
Optional: the description of the scheduled event (1-1000 characters)
◆ entity_id
any additional id of the hosting entity associated with event, e.g. stage instance id) (may be empty)
◆ entity_metadata
the entity metadata for the scheduled event (may be empty)
◆ entity_type
the type of hosting entity associated with a scheduled event, e.g. voice channel or stage channel
◆ guild_id
the guild id which the scheduled event belongs to
◆ 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.
◆ image
std::string dpp::scheduled_event::image |
the image of the scheduled event (may be empty)
◆ name
std::string dpp::scheduled_event::name |
the name of the scheduled event
◆ privacy_level
the privacy level of the scheduled event
◆ scheduled_end_time
time_t 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 (may be empty)
◆ scheduled_start_time
time_t dpp::scheduled_event::scheduled_start_time |
the time the scheduled event will start
◆ status
the status of the scheduled event
◆ user_count
uint32_t dpp::scheduled_event::user_count |
Optional: the number of users subscribed to the scheduled event.