D++ (DPP)
C++ Discord API Bot Library
|
Represents stickers received in messages. More...
#include <message.h>
Public Member Functions | |
sticker () | |
Construct a new sticker object. More... | |
virtual | ~sticker ()=default |
sticker & | fill_from_json (nlohmann::json *j) |
virtual std::string | build_json (bool with_id=true) const |
std::string | get_url (bool accept_lottie=true) const |
Get the sticker url. More... | |
sticker & | set_filename (const std::string &fn) |
Set the filename. More... | |
sticker & | set_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 relevant to us as useful metadata. More... | |
Represents stickers received in messages.
dpp::sticker::sticker | ( | ) |
Construct a new sticker object.
|
virtualdefault |
|
virtual |
Build JSON from this object.
with_id | True if the ID is to be set in the JSON structure |
Reimplemented from dpp::json_interface< sticker >.
sticker & dpp::sticker::fill_from_json | ( | nlohmann::json * | j | ) |
Read class values from json object
j | A json object to read from |
|
inherited |
Get the creation time of this object according to Discord.
std::string dpp::sticker::get_url | ( | bool | accept_lottie = true | ) | const |
Get the sticker url.
accept_lottie | Whether to allow that lottie (json format) can be returned or not |
sticker & dpp::sticker::set_file_content | ( | const std::string & | fc | ) |
Set the file content.
fc | raw file content contained in std::string |
sticker & dpp::sticker::set_filename | ( | const std::string & | fn | ) |
Set the filename.
fn | filename |
std::string dpp::sticker::asset |
Asset ID.
bool dpp::sticker::available |
Optional: whether this guild sticker can be used, may be false due to loss of Server Boosts.
std::string dpp::sticker::description |
description of the sticker (may be empty)
std::string dpp::sticker::filecontent |
File content to upload (raw binary)
std::string dpp::sticker::filename |
Name of file to upload (when adding or editing a sticker)
sticker_format dpp::sticker::format_type |
type of sticker format
snowflake dpp::sticker::guild_id |
Optional: id of the guild that owns this sticker.
|
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::name |
The name of the sticker
snowflake dpp::sticker::pack_id |
Optional: for standard stickers, id of the pack the sticker is from
uint8_t dpp::sticker::sort_value |
Optional: the standard sticker's sort order within its pack.
user dpp::sticker::sticker_user |
Optional: the user that uploaded the guild sticker.
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.
sticker_type dpp::sticker::type |
The type of sticker