tgbotxx
1.1.6.9
Telegram Bot C++ Library
|
This object represents a sticker. https://core.telegram.org/bots/api#sticker. More...
#include <Sticker.hpp>
Public Types | |
enum class | Type : std::uint8_t { Regular = 0 , Mask , CustomEmoji } |
Enum of possible types of a Sticker. More... | |
Public Member Functions | |
Sticker ()=default | |
Sticker (const nl::json &json) | |
nl::json | toJson () const |
Serializes this object to JSON. More... | |
void | fromJson (const nl::json &json) |
Deserializes this object from JSON. More... | |
Static Public Member Functions | |
static constexpr Type | Str2Type (const std::string &str) |
Public Attributes | |
std::string | fileId |
Identifier for this file, which can be used to download or reuse the file. More... | |
std::string | fileUniqueId |
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. More... | |
Type | type {} |
Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video. More... | |
std::int32_t | width {} |
Sticker width. More... | |
std::int32_t | height {} |
Sticker height. More... | |
bool | isAnimated {} |
True, if the sticker is animated. More... | |
bool | isVideo {} |
True, if the sticker is a video sticker. More... | |
Ptr< PhotoSize > | thumbnail |
Optional. Sticker thumbnail in the .WEBP or .JPG format. More... | |
std::string | emoji |
Optional. Emoji associated with the sticker. More... | |
std::string | setName |
Optional. Name of the sticker set to which the sticker belongs. More... | |
Ptr< File > | premiumAnimation |
Optional. For premium regular stickers, premium animation for the sticker. More... | |
Ptr< MaskPosition > | maskPosition |
Optional. For mask stickers, the position where the mask should be placed. More... | |
std::string | customEmojiId |
Optional. For custom emoji stickers, unique identifier of the custom emoji. More... | |
bool | needsRepainting {} |
Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places. More... | |
std::int64_t | fileSize {} |
Optional. File size in bytes. More... | |
Static Public Attributes | |
static constexpr const char * | Type2Str [] = {"regular", "mask", "custom_emoji"} |
This object represents a sticker. https://core.telegram.org/bots/api#sticker.
Definition at line 10 of file Sticker.hpp.
|
strong |
Enum of possible types of a Sticker.
Enumerator | |
---|---|
Regular | |
Mask | |
CustomEmoji |
Definition at line 24 of file Sticker.hpp.
|
default |
|
inlineexplicit |
Definition at line 12 of file Sticker.hpp.
|
inline |
Deserializes this object from JSON.
Definition at line 105 of file Sticker.hpp.
|
inlinestaticconstexpr |
Definition at line 30 of file Sticker.hpp.
|
inline |
Serializes this object to JSON.
Definition at line 84 of file Sticker.hpp.
std::string tgbotxx::Sticker::customEmojiId |
Optional. For custom emoji stickers, unique identifier of the custom emoji.
Definition at line 71 of file Sticker.hpp.
std::string tgbotxx::Sticker::emoji |
Optional. Emoji associated with the sticker.
Definition at line 59 of file Sticker.hpp.
std::string tgbotxx::Sticker::fileId |
Identifier for this file, which can be used to download or reuse the file.
Definition at line 17 of file Sticker.hpp.
std::int64_t tgbotxx::Sticker::fileSize {} |
Optional. File size in bytes.
Definition at line 79 of file Sticker.hpp.
std::string tgbotxx::Sticker::fileUniqueId |
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
Definition at line 21 of file Sticker.hpp.
std::int32_t tgbotxx::Sticker::height {} |
Sticker height.
Definition at line 47 of file Sticker.hpp.
bool tgbotxx::Sticker::isAnimated {} |
True, if the sticker is animated.
Definition at line 50 of file Sticker.hpp.
bool tgbotxx::Sticker::isVideo {} |
True, if the sticker is a video sticker.
Definition at line 53 of file Sticker.hpp.
Ptr<MaskPosition> tgbotxx::Sticker::maskPosition |
Optional. For mask stickers, the position where the mask should be placed.
Definition at line 68 of file Sticker.hpp.
bool tgbotxx::Sticker::needsRepainting {} |
Optional. True, if the sticker must be repainted to a text color in messages, the color of the Telegram Premium badge in emoji status, white color on chat photos, or another appropriate color in other places.
Definition at line 76 of file Sticker.hpp.
Optional. For premium regular stickers, premium animation for the sticker.
Definition at line 65 of file Sticker.hpp.
std::string tgbotxx::Sticker::setName |
Optional. Name of the sticker set to which the sticker belongs.
Definition at line 62 of file Sticker.hpp.
Optional. Sticker thumbnail in the .WEBP or .JPG format.
Definition at line 56 of file Sticker.hpp.
Type tgbotxx::Sticker::type {} |
Type of the sticker, currently one of “regular”, “mask”, “custom_emoji”. The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video.
Definition at line 41 of file Sticker.hpp.
|
inlinestaticconstexpr |
Definition at line 29 of file Sticker.hpp.
std::int32_t tgbotxx::Sticker::width {} |
Sticker width.
Definition at line 44 of file Sticker.hpp.