D++ (DPP)
C++ Discord API Bot Library
dpp::sticker_pack Struct Reference

Represents a sticker pack (the built in groups of stickers that all nitro users get to use) More...

#include <message.h>

+ Inheritance diagram for dpp::sticker_pack:
+ Collaboration diagram for dpp::sticker_pack:

Public Member Functions

 sticker_pack ()
 Construct a new sticker pack object. More...
 
virtual ~sticker_pack ()=default
 
sticker_packfill_from_json (nlohmann::json *j)
 
virtual std::string build_json (bool with_id=true) const
 
double get_creation_time () const
 Get the creation time of this object according to Discord. More...
 
bool operator== (const managed &other) const noexcept
 Comparison operator for comparing two managed objects by id. More...
 
bool operator!= (const managed &other) const noexcept
 Comparison operator for comparing two managed objects by id. More...
 

Public Attributes

std::map< snowflake, stickerstickers
 the stickers in the pack More...
 
std::string name
 name of the sticker pack More...
 
snowflake sku_id
 id of the pack's SKU More...
 
snowflake cover_sticker_id
 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...
 

Detailed Description

Represents a sticker pack (the built in groups of stickers that all nitro users get to use)

Constructor & Destructor Documentation

◆ sticker_pack()

dpp::sticker_pack::sticker_pack ( )

Construct a new sticker pack object.

◆ ~sticker_pack()

virtual dpp::sticker_pack::~sticker_pack ( )
virtualdefault

Member Function Documentation

◆ build_json()

virtual std::string dpp::sticker_pack::build_json ( bool  with_id = true) const
virtual

Build JSON from this object.

Parameters
with_idTrue if the ID is to be set in the JSON structure
Returns
The JSON text of the invite

Reimplemented from dpp::json_interface< sticker_pack >.

◆ fill_from_json()

sticker_pack & dpp::sticker_pack::fill_from_json ( nlohmann::json *  j)

Read class values from json object

Parameters
jA json object to read from
Returns
A reference to self

◆ 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
otherOther 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
otherOther object to compare against
Returns
true objects are the same id
false objects are not the same id

Member Data Documentation

◆ banner_asset_id

snowflake dpp::sticker_pack::banner_asset_id

id of the sticker pack's banner image

◆ cover_sticker_id

snowflake dpp::sticker_pack::cover_sticker_id

Optional: id of a sticker in the pack which is shown as the pack's icon.

◆ description

std::string dpp::sticker_pack::description

description of the sticker pack

◆ id

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

◆ name

std::string dpp::sticker_pack::name

name of the sticker pack

◆ sku_id

snowflake dpp::sticker_pack::sku_id

id of the pack's SKU

◆ stickers

std::map<snowflake, sticker> dpp::sticker_pack::stickers

the stickers in the pack

D++ Library version 10.0.29D++ Library version 10.0.28D++ Library version 10.0.27D++ Library version 10.0.26D++ Library version 10.0.25D++ Library version 10.0.24D++ Library version 10.0.23D++ Library version 10.0.22D++ Library version 10.0.21D++ Library version 10.0.20D++ Library version 10.0.19D++ Library version 10.0.18D++ Library version 10.0.17D++ Library version 10.0.16D++ Library version 10.0.15D++ Library version 10.0.14D++ Library version 10.0.13D++ Library version 10.0.12D++ Library version 10.0.11D++ Library version 10.0.10D++ Library version 10.0.9D++ Library version 10.0.8D++ Library version 10.0.7D++ Library version 10.0.6D++ Library version 10.0.5D++ Library version 10.0.4D++ Library version 10.0.3D++ Library version 10.0.2D++ Library version 10.0.1D++ Library version 10.0.0D++ Library version 9.0.19D++ Library version 9.0.18D++ Library version 9.0.17D++ Library version 9.0.16D++ Library version 9.0.15D++ Library version 9.0.14D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0