24 enum class Type : std::uint8_t {
37 static std::optional<Type>
StringToType(
const std::string& str)
noexcept {
89 nl::json json = nl::json::object();
#define OBJECT_SERIALIZE_FIELD_PTR(json, json_field, field)
#define OBJECT_DESERIALIZE_FIELD_PTR(json, json_field, field, optional)
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
#define OBJECT_DESERIALIZE_FIELD_ENUM(json, enum_name, json_field, field, default_value, optional)
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
#define OBJECT_SERIALIZE_FIELD_ENUM(json, enum_name, json_field, field)
This object represents a sticker. https://core.telegram.org/bots/api#sticker.
Type type
Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is i...
static std::optional< Type > StringToType(const std::string &str) noexcept
Converts string to an enum Type.
static std::optional< std::string > TypeToString(const Type type) noexcept
Converts enum Type to a string.
std::string emoji
Optional. Emoji associated with the sticker.
bool isVideo
True, if the sticker is a video sticker.
std::string fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots....
Sticker(const nl::json &json)
Type
Enum of possible types of Type.
std::int64_t fileSize
Optional. File size in bytes.
std::int32_t height
Sticker height.
bool needsRepainting
Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegr...
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::string customEmojiId
Optional. For custom emoji stickers, unique identifier of the custom emoji.
std::string setName
Optional. Name of the sticker set to which the sticker belongs.
std::int32_t width
Sticker width.
Ptr< File > premiumAnimation
Optional. For premium regular stickers, premium animation for the sticker.
nl::json toJson() const
Serializes this object to JSON.
std::string fileId
Identifier for this file, which can be used to download or reuse the file.
Ptr< MaskPosition > maskPosition
Optional. For mask stickers, the position where the mask should be placed.
bool isAnimated
True, if the sticker is animated.
Ptr< PhotoSize > thumbnail
Optional. Sticker thumbnail in the .WEBP or .JPG format.