A scheduled event.
More...
#include <scheduled_event.h>
|
| snowflake | channel_id |
| | The channel ID in which the scheduled event will be hosted, or null if scheduled entity type is EXTERNAL.
|
| |
| user | creator |
| | Optional: The creator of the scheduled event.
|
| |
| snowflake | creator_id |
| | Optional: The ID of the user that created the scheduled event.
|
| |
| std::string | description |
| | Optional: The description of the scheduled event (1-1000 characters).
|
| |
| snowflake | entity_id |
| | Any additional ID of the hosting entity associated with event. e.g. stage instance ID.
|
| |
| event_entities | entity_metadata |
| | The entity metadata for the scheduled event.
|
| |
| event_entity_type | entity_type |
| | The type of hosting entity associated with a scheduled event. e.g. voice channel or stage channel.
|
| |
| snowflake | guild_id |
| | The guild ID which the scheduled event belongs to.
|
| |
| snowflake | 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 | image |
| | The image of the scheduled event.
|
| |
| std::string | name |
| | The name of the scheduled event.
|
| |
| event_privacy_level | privacy_level |
| | The privacy level of the scheduled event.
|
| |
| time_t | scheduled_end_time |
| | The time the scheduled event will end, or null if the event does not have a scheduled time to end.
|
| |
| time_t | scheduled_start_time |
| | The time the scheduled event will start.
|
| |
| event_status | status |
| | The status of the scheduled event.
|
| |
| uint32_t | user_count |
| | Optional: The number of users subscribed to the scheduled event.
|
| |
◆ scheduled_event()
| dpp::scheduled_event::scheduled_event |
( |
| ) |
|
◆ build_json()
Convert object to json string.
- Parameters
-
| with_id | Whether to include the ID or not |
- Note
- Some fields are conditionally filled, do not rely on all fields being present
- Returns
- std::string Json built from the structure
◆ clear_description()
Clear the description of the event.
- Returns
- scheduled_event& reference to self
◆ fill_from_json()
Convert object from nlohmann::json.
- Parameters
-
- Returns
- T& Reference to self for fluent calling
◆ fill_from_json_impl()
◆ get_creation_time()
| constexpr double dpp::managed::get_creation_time |
( |
| ) |
const |
|
inlineconstexprnoexceptinherited |
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.
◆ load_image() [1/2]
Load an image for the event cover.
- Parameters
-
| 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. |
- Returns
- emoji& Reference to self
◆ load_image() [2/2]
Load an image for the event cover.
- Parameters
-
| image_blob | Image binary data |
| type | Type of image. It can be one of i_gif, i_jpg or i_png. |
- Returns
- emoji& Reference to self
◆ operator!=()
|
|
inlineconstexprnoexceptinherited |
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==()
|
|
inlineconstexprnoexceptinherited |
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()
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()
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
-
◆ to_json()
Convert object to nlohmann::json.
- Parameters
-
| with_id | Whether to include the ID or not |
- Note
- Some fields are conditionally filled, do not rely on all fields being present
- Returns
- json Json built from the structure
◆ to_json_impl()
| json dpp::scheduled_event::to_json_impl |
( |
bool |
with_id = false | ) |
const |
|
protected |
Build json for this object.
- Parameters
-
| with_id | Include id field in json |
- Returns
- std::string Json of this object
◆ json_interface< scheduled_event >
◆ channel_id
The channel ID in which the scheduled event will be hosted, or null if scheduled entity type is EXTERNAL.
- Note
- This 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.
- Note
- This may be empty.
◆ entity_metadata
The entity metadata for the scheduled event.
- Note
- This 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
The image of the scheduled event.
- Note
- This 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.
- Note
- This 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.