|
tgbotxx 1.1.9.2
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 Type. More... | |
Public Member Functions | |
| Sticker ()=default | |
| Sticker (const nl::json &json) | |
| nl::json | toJson () const |
| Serializes this object to JSON. | |
| void | fromJson (const nl::json &json) |
| Deserializes this object from JSON. | |
Static Public Member Functions | |
| static std::optional< std::string > | TypeToString (const Type type) noexcept |
| Converts enum Type to a string. | |
| static std::optional< Type > | StringToType (const std::string &str) noexcept |
| Converts string to an enum Type. | |
Public Attributes | |
| std::string | fileId |
| Identifier for this file, which can be used to download or reuse the file. | |
| 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. | |
| 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. | |
| std::int32_t | width {} |
| Sticker width. | |
| std::int32_t | height {} |
| Sticker height. | |
| bool | isAnimated {} |
| True, if the sticker is animated. | |
| bool | isVideo {} |
| True, if the sticker is a video sticker. | |
| Ptr< PhotoSize > | thumbnail |
| Optional. Sticker thumbnail in the .WEBP or .JPG format. | |
| std::string | emoji |
| Optional. Emoji associated with the sticker. | |
| std::string | setName |
| Optional. Name of the sticker set to which the sticker belongs. | |
| Ptr< File > | premiumAnimation |
| Optional. For premium regular stickers, premium animation for the sticker. | |
| Ptr< MaskPosition > | maskPosition |
| Optional. For mask stickers, the position where the mask should be placed. | |
| std::string | customEmojiId |
| Optional. For custom emoji stickers, unique identifier of the custom emoji. | |
| 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. | |
| std::int64_t | fileSize {} |
| Optional. File size in bytes. | |
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 Type.
| 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 109 of file Sticker.hpp.
|
inlinestaticnoexcept |
Converts string to an enum Type.
Definition at line 37 of file Sticker.hpp.
|
inline |
Serializes this object to JSON.
Definition at line 88 of file Sticker.hpp.
|
inlinestaticnoexcept |
Converts enum Type to a string.
Definition at line 30 of file Sticker.hpp.
| std::string tgbotxx::Sticker::customEmojiId |
Optional. For custom emoji stickers, unique identifier of the custom emoji.
Definition at line 75 of file Sticker.hpp.
| std::string tgbotxx::Sticker::emoji |
Optional. Emoji associated with the sticker.
Definition at line 63 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 83 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 51 of file Sticker.hpp.
| bool tgbotxx::Sticker::isAnimated {} |
True, if the sticker is animated.
Definition at line 54 of file Sticker.hpp.
| bool tgbotxx::Sticker::isVideo {} |
True, if the sticker is a video sticker.
Definition at line 57 of file Sticker.hpp.
| Ptr<MaskPosition> tgbotxx::Sticker::maskPosition |
Optional. For mask stickers, the position where the mask should be placed.
Definition at line 72 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 80 of file Sticker.hpp.
Optional. For premium regular stickers, premium animation for the sticker.
Definition at line 69 of file Sticker.hpp.
| std::string tgbotxx::Sticker::setName |
Optional. Name of the sticker set to which the sticker belongs.
Definition at line 66 of file Sticker.hpp.
Optional. Sticker thumbnail in the .WEBP or .JPG format.
Definition at line 60 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 45 of file Sticker.hpp.
| std::int32_t tgbotxx::Sticker::width {} |
Sticker width.
Definition at line 48 of file Sticker.hpp.