Represents an emoji for a dpp::guild.
More...
#include <emoji.h>
Represents an emoji for a dpp::guild.
◆ emoji() [1/2]
Construct a new emoji object.
◆ emoji() [2/2]
dpp::emoji::emoji |
( |
const std::string |
, |
|
|
const |
snowflake = 0 , |
|
|
const uint8_t |
= 0 |
|
) |
| |
Construct a new emoji object with name, ID and flags.
- Parameters
-
name | The emoji's name |
id | ID, if it has one (unicode does not) |
flags | Emoji flags (emoji_flags) |
◆ ~emoji()
Destroy the emoji object.
◆ build_json()
std::string dpp::emoji::build_json |
( |
bool |
with_id = false | ) |
const |
Build the json for this object.
- Parameters
-
with_id | include the id in the JSON |
- Returns
- std::string json data
◆ fill_from_json()
Read class values from json object.
- Parameters
-
j | A json object to read from |
- Returns
- A reference to self
◆ format()
std::string dpp::emoji::format |
( |
| ) |
const |
Format to name if unicode, name:id if has id or a:name:id if animated.
- Returns
- Formatted name for reactions
◆ 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_blob | Image binary data |
type | Type 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
◆ flags
uint8_t dpp::emoji::flags |
◆ id
◆ image_data
std::string* dpp::emoji::image_data |
Image data for the emoji if uploading.
◆ name
std::string dpp::emoji::name |
◆ user_id
User id who uploaded the emoji.