dpp::sticker
dpp::managed
dpp::json_interface< sticker >
message.h
struct friend struct json_interface< sticker > json_interface< sticker > dpp::sticker::json_interface< sticker > json_interface< sticker >
std::string std::string dpp::sticker::asset asset 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 this field here in the library.

bool bool dpp::sticker::available available dpp::sticker::available

Optional: Whether this guild sticker can be used.

May be false due to loss of Server Boosts.

std::string std::string dpp::sticker::description description dpp::sticker::description

Description of the sticker.

This may be empty.

std::string std::string dpp::sticker::filecontent filecontent dpp::sticker::filecontent

File content to upload (raw binary).

std::string std::string dpp::sticker::filename filename dpp::sticker::filename

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

sticker_format sticker_format dpp::sticker::format_type format_type dpp::sticker::format_type

type of sticker format.

snowflake snowflake dpp::sticker::guild_id guild_id dpp::sticker::guild_id

Optional: ID of the guild that owns this sticker.

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

std::string std::string dpp::sticker::name name dpp::sticker::name

The name of the sticker.

snowflake snowflake dpp::sticker::pack_id pack_id dpp::sticker::pack_id

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

uint8_t uint8_t dpp::sticker::sort_value sort_value dpp::sticker::sort_value

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

user user dpp::sticker::sticker_user sticker_user dpp::sticker::sticker_user

Optional: The user that uploaded the guild sticker.

std::string std::string dpp::sticker::tags tags dpp::sticker::tags

The sticker's (or related) expressions.

If it's a guild sticker, this will be the Discord name of a unicode emoji representing the sticker's expression. Otherwise, this will be a comma-separated list of related expressions.

sticker_type sticker_type dpp::sticker::type type dpp::sticker::type

The type of sticker.

sticker & sticker & dpp::sticker::fill_from_json_impl (nlohmann::json *j) fill_from_json_impl dpp::sticker::fill_from_json_impl nlohmann::json * j

Read class values from json object j

A json object to read from

A reference to self

json virtual json dpp::sticker::to_json_impl (bool with_id=true) const to_json_impl dpp::sticker::to_json_impl bool with_id true

Build JSON from this object. with_id

True if the ID is to be set in the JSON structure

The JSON of the invite

dpp::sticker::sticker
()
sticker
dpp::sticker::sticker

Construct a new sticker object.

virtual dpp::sticker::~sticker
()=default
~sticker
dpp::sticker::~sticker
std::string std::string dpp::json_interface< sticker >::build_json (bool with_id=false) const build_json dpp::json_interface< sticker >::build_json bool with_id false

Convert object to json string.

with_id

Whether to include the ID or not

Some fields are conditionally filled, do not rely on all fields being present

std::string Json built from the structure

sticker & sticker & dpp::json_interface< sticker >::fill_from_json (nlohmann::json *j) fill_from_json dpp::json_interface< sticker >::fill_from_json nlohmann::json * j

Convert object from nlohmann::json.

j

nlohmann::json object

T& Reference to self for fluent calling

double double dpp::managed::get_creation_time () const noexcept get_creation_time dpp::managed::get_creation_time

Get the creation time of this object according to Discord.

double creation time inferred from the snowflake ID. The minimum possible value is the first second of 2015.

std::string std::string dpp::sticker::get_url () const get_url dpp::sticker::get_url

Get the sticker url.

std::string The sticker url or an empty string, if the id is empty

bool bool dpp::managed::operator!= (const managed &other) const noexcept operator!= dpp::managed::operator!= const managed & other

Comparison operator for comparing two managed objects by id.

other

Other object to compare against

true objects are not the same id

false objects are the same id

bool bool dpp::managed::operator== (const managed &other) const noexcept operator== dpp::managed::operator== const managed & other

Comparison operator for comparing two managed objects by id.

other

Other object to compare against

true objects are the same id

false objects are not the same id

sticker & sticker & dpp::sticker::set_file_content (std::string_view fc) set_file_content dpp::sticker::set_file_content std::string_view fc

Set the file content.

fc

raw file content

message& reference to self

sticker & sticker & dpp::sticker::set_filename (std::string_view fn) set_filename dpp::sticker::set_filename std::string_view fn

Set the filename.

fn

filename

message& reference to self

auto auto dpp::json_interface< sticker >::to_json (bool with_id=false) const to_json dpp::json_interface< sticker >::to_json bool with_id false

Convert object to nlohmann::json.

with_id

Whether to include the ID or not

Some fields are conditionally filled, do not rely on all fields being present

json Json built from the structure

Represents stickers received in messages.

dpp::json_interface< T >
dpp::json_interface< sticker >
< sticker >
dpp::managed
dpp::sticker
bool
dpp::json_interface< T >
dpp::json_interface< sticker >
< sticker >
dpp::json_interface< user >
< user >
dpp::managed
id
dpp::snowflake
value
dpp::sticker
guild_id
pack_id
asset
description
filecontent
filename
name
tags
type
format_type
available
sticker_user
sort_value
dpp::user
global_name
username
avatar
avatar_decoration
primary_guild
flags
discriminator
refcount
dpp::utility::iconhash
first
second
dpp::utility::primaryguild
id
enabled
tag
badge
std::basic_string< Char >
std::string
sticker_format
sticker_type
uint16_t
uint32_t
uint64_t
uint8_t
- dpp::sticker
  asset
- dpp::sticker
  available
- dpp::sticker
  build_json
- dpp::sticker
  description
- dpp::sticker
  filecontent
- dpp::sticker
  filename
- dpp::sticker
  fill_from_json
- dpp::sticker
  fill_from_json_impl
- dpp::sticker
  format_type
- dpp::sticker
  get_creation_time
- dpp::sticker
  get_url
- dpp::sticker
  guild_id
- dpp::sticker
  id
- dpp::sticker
  json_interface< sticker >
- dpp::sticker
  managed
- dpp::sticker
  managed
- dpp::sticker
  managed
- dpp::sticker
  managed
- dpp::sticker
  name
- dpp::sticker
  operator!=
- dpp::sticker
  operator=
- dpp::sticker
  operator=
- dpp::sticker
  operator==
- dpp::sticker
  pack_id
- dpp::sticker
  set_file_content
- dpp::sticker
  set_filename
- dpp::sticker
  sort_value
- dpp::sticker
  sticker
- dpp::sticker
  sticker_user
- dpp::sticker
  tags
- dpp::sticker
  to_json
- dpp::sticker
  to_json_impl
- dpp::sticker
  type
- dpp::sticker
  ~managed
- dpp::sticker
  ~sticker