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