D++ (DPP)
C++ Discord API Bot Library
|
Represents a sticker pack (the built in groups of stickers that all nitro users get to use) More...
#include <message.h>
Public Member Functions | |
constexpr double | get_creation_time () const noexcept |
Get the creation time of this object according to Discord. More... | |
constexpr bool | operator== (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
constexpr bool | operator!= (const managed &other) const noexcept |
Comparison operator for comparing two managed objects by id. More... | |
sticker_pack & | fill_from_json (nlohmann::json *j) |
Convert object from nlohmann::json. More... | |
auto | to_json (bool with_id=false) const |
Convert object to nlohmann::json. More... | |
std::string | build_json (bool with_id=false) const |
Convert object to json string. More... | |
Public Attributes | |
std::map< snowflake, sticker > | stickers {} |
The stickers in the pack. More... | |
std::string | name {} |
Name of the sticker pack. More... | |
snowflake | sku_id {0} |
ID of the pack's SKU. More... | |
snowflake | cover_sticker_id {0} |
Optional: ID of a sticker in the pack which is shown as the pack's icon. More... | |
std::string | description {} |
Description of the sticker pack. More... | |
snowflake | banner_asset_id {} |
ID of the sticker pack's banner image. More... | |
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. More... | |
Protected Member Functions | |
sticker_pack & | fill_from_json_impl (nlohmann::json *j) |
virtual json | to_json_impl (bool with_id=true) const |
Friends | |
struct | json_interface< sticker_pack > |
Represents a sticker pack (the built in groups of stickers that all nitro users get to use)
|
inlineinherited |
Convert object to json string.
with_id | Whether to include the ID or not |
|
inlineinherited |
Convert object from nlohmann::json.
j | nlohmann::json object |
|
protected |
Read class values from json object
j | A json object to read from |
|
inlineconstexprnoexceptinherited |
Get the creation time of this object according to Discord.
|
inlineconstexprnoexceptinherited |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
|
inlineconstexprnoexceptinherited |
Comparison operator for comparing two managed objects by id.
other | Other object to compare against |
|
inlineinherited |
Convert object to nlohmann::json.
with_id | Whether to include the ID or not |
|
protectedvirtual |
Build JSON from this object.
with_id | True if the ID is to be set in the JSON structure |
|
friend |
snowflake dpp::sticker_pack::banner_asset_id {} |
ID of the sticker pack's banner image.
snowflake dpp::sticker_pack::cover_sticker_id {0} |
Optional: ID of a sticker in the pack which is shown as the pack's icon.
std::string dpp::sticker_pack::description {} |
Description of the sticker pack.
|
inherited |
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.
std::string dpp::sticker_pack::name {} |
Name of the sticker pack.
snowflake dpp::sticker_pack::sku_id {0} |
ID of the pack's SKU.