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

Represents stickers received in messages. More...

#include <message.h>

+ Inheritance diagram for dpp::sticker:
+ Collaboration diagram for dpp::sticker:

Public Member Functions

 sticker ()
 Construct a new sticker object. More...
 
stickerfill_from_json (nlohmann::json *j)
 
std::string build_json (bool with_id=true) const
 
stickerset_filename (const std::string &fn)
 Set the filename. More...
 
stickerset_file_content (const std::string &fc)
 Set the file content. More...
 
double get_creation_time () const
 Get the creation time of this object according to Discord. More...
 

Public Attributes

snowflake pack_id
 
std::string name
 
std::string description
 description of the sticker (may be empty) More...
 
std::string tags
 
std::string asset
 Asset ID. More...
 
sticker_type type
 
sticker_format format_type
 type of sticker format More...
 
bool available
 Optional: whether this guild sticker can be used, may be false due to loss of Server Boosts. More...
 
snowflake guild_id
 Optional: id of the guild that owns this sticker. More...
 
user sticker_user
 Optional: the user that uploaded the guild sticker. More...
 
uint8_t sort_value
 Optional: the standard sticker's sort order within its pack. More...
 
std::string filename
 
std::string filecontent
 
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 relavent to us as useful metadata. More...
 

Detailed Description

Represents stickers received in messages.

Constructor & Destructor Documentation

◆ sticker()

dpp::sticker::sticker ( )

Construct a new sticker object.

Member Function Documentation

◆ build_json()

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

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

◆ fill_from_json()

sticker & dpp::sticker::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.

◆ set_file_content()

sticker & dpp::sticker::set_file_content ( const std::string &  fc)

Set the file content.

Parameters
fcraw file content contained in std::string
Returns
message& reference to self

◆ set_filename()

sticker & dpp::sticker::set_filename ( const std::string &  fn)

Set the filename.

Parameters
fnfilename
Returns
message& reference to self

Member Data Documentation

◆ asset

std::string dpp::sticker::asset

Asset ID.

Deprecated:
now an empty string but still sent by discord. While discord still send this empty string value we will still have a field here in the library.

◆ available

bool dpp::sticker::available

Optional: whether this guild sticker can be used, may be false due to loss of Server Boosts.

◆ description

std::string dpp::sticker::description

description of the sticker (may be empty)

◆ filecontent

std::string dpp::sticker::filecontent

File content to upload (raw binary)

◆ filename

std::string dpp::sticker::filename

Name of file to upload (when adding or editing a sticker)

◆ format_type

sticker_format dpp::sticker::format_type

type of sticker format

◆ guild_id

snowflake dpp::sticker::guild_id

Optional: id of the guild that owns this sticker.

◆ 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 relavent to us as useful metadata.

◆ name

std::string dpp::sticker::name

The name of the sticker

◆ pack_id

snowflake dpp::sticker::pack_id

Optional: for standard stickers, id of the pack the sticker is from

◆ sort_value

uint8_t dpp::sticker::sort_value

Optional: the standard sticker's sort order within its pack.

◆ sticker_user

user dpp::sticker::sticker_user

Optional: the user that uploaded the guild sticker.

◆ tags

std::string dpp::sticker::tags

for guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions.

◆ type

sticker_type dpp::sticker::type

The type of sticker

D++ Library version 10.0.35D++ Library version 10.0.34D++ Library version 10.0.33D++ Library version 10.0.32D++ Library version 10.0.31D++ Library version 10.0.30D++ 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