D++ (DPP)
C++ Discord API Bot Library
dpp::emoji Class Reference

Represents an emoji for a dpp::guild. More...

#include <emoji.h>

+ Inheritance diagram for dpp::emoji:
+ Collaboration diagram for dpp::emoji:

Public Member Functions

 emoji ()
 Construct a new emoji object. More...
 
 ~emoji ()
 Destroy the emoji object. More...
 
emojifill_from_json (nlohmann::json *j)
 Read class values from json object. More...
 
std::string build_json (bool with_id=false) const
 Build the json for this object. More...
 
bool requires_colons () const
 Emoji requires colons. More...
 
bool is_managed () const
 Emoji is managed. More...
 
bool is_animated () const
 Emoji is animated. More...
 
bool is_available () const
 Is available. More...
 
emojiload_image (const std::string &image_blob, image_type type)
 Load an image into the object as base64. More...
 

Public Attributes

std::string name
 Emoji name. More...
 
snowflake user_id
 User id who uploaded the emoji. More...
 
uint8_t flags
 Flags for the emoji from dpp::emoji_flags. More...
 
std::string * image_data
 Image data for the emoji if uploading. More...
 
snowflake id
 

Detailed Description

Represents an emoji for a dpp::guild.

Constructor & Destructor Documentation

◆ emoji()

dpp::emoji::emoji ( )

Construct a new emoji object.

◆ ~emoji()

dpp::emoji::~emoji ( )

Destroy the emoji object.

Member Function Documentation

◆ build_json()

std::string dpp::emoji::build_json ( bool  with_id = false) const

Build the json for this object.

Parameters
with_idinclude the id in the JSON
Returns
std::string json data

◆ fill_from_json()

emoji & dpp::emoji::fill_from_json ( nlohmann::json j)

Read class values from json object.

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

◆ is_animated()

bool dpp::emoji::is_animated ( ) const

Emoji is animated.

Returns
true Is animated
false Is noy animated

◆ is_available()

bool dpp::emoji::is_available ( ) const

Is available.

Returns
true Is available
false Is unavailable

◆ is_managed()

bool dpp::emoji::is_managed ( ) const

Emoji is managed.

Returns
true Is managed
false Is not managed

◆ load_image()

emoji & dpp::emoji::load_image ( const std::string &  image_blob,
image_type  type 
)

Load an image into the object as base64.

Parameters
image_blobImage binary data
typeType of image
Returns
emoji& Reference to self

◆ requires_colons()

bool dpp::emoji::requires_colons ( ) const

Emoji requires colons.

Returns
true Requires colons
false Does not require colons

Member Data Documentation

◆ flags

uint8_t dpp::emoji::flags

Flags for the emoji from dpp::emoji_flags.

◆ id

snowflake dpp::managed::id
inherited

Unique ID of object

◆ image_data

std::string* dpp::emoji::image_data

Image data for the emoji if uploading.

◆ name

std::string dpp::emoji::name

Emoji name.

◆ user_id

snowflake dpp::emoji::user_id

User id who uploaded the emoji.

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