This object represents a gift that can be sent by the bot. https://core.telegram.org/bots/api#gift.
More...
#include <Gift.hpp>
|
| std::string | id |
| | Unique identifier of the gift.
|
| |
| Ptr< Sticker > | sticker |
| | The sticker that represents the gift.
|
| |
| std::int64_t | starCount {} |
| | The number of Telegram Stars that must be paid to send the sticker.
|
| |
| std::int64_t | upgradeStarCount {} |
| | Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one.
|
| |
| bool | isPremium {} |
| | Optional. True, if the gift can only be purchased by Telegram Premium subscribers.
|
| |
| bool | hasColors {} |
| | Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance.
|
| |
| std::int64_t | totalCount {} |
| | Optional. The total number of the gifts of this type that can be sent; for limited gifts only.
|
| |
| std::int64_t | remainingCount {} |
| | Optional. The number of remaining gifts of this type that can be sent; for limited gifts only.
|
| |
| std::int64_t | personalTotalCount {} |
| | Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only.
|
| |
| std::int64_t | personalRemainingCount {} |
| | Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only.
|
| |
| Ptr< GiftBackground > | background |
| | Optional. Information about the chat that published the gift.
|
| |
| std::int64_t | uniqueGiftVariantCount {} |
| | Optional. The total number of different unique gifts that can be obtained by upgrading the gift.
|
| |
| Ptr< Chat > | publisherChat |
| | Optional. Information about the chat that published the gift.
|
| |
This object represents a gift that can be sent by the bot. https://core.telegram.org/bots/api#gift.
Definition at line 10 of file Gift.hpp.
◆ Gift() [1/2]
◆ Gift() [2/2]
| tgbotxx::Gift::Gift |
( |
const nl::json & |
json | ) |
|
|
inlineexplicit |
◆ fromJson()
| void tgbotxx::Gift::fromJson |
( |
const nl::json & |
json | ) |
|
|
inline |
Deserializes this object from JSON.
Definition at line 76 of file Gift.hpp.
◆ toJson()
| nl::json tgbotxx::Gift::toJson |
( |
| ) |
const |
|
inline |
Serializes this object to JSON.
- Returns
- JSON representation of this object
Definition at line 57 of file Gift.hpp.
◆ background
Optional. Information about the chat that published the gift.
Definition at line 47 of file Gift.hpp.
◆ hasColors
| bool tgbotxx::Gift::hasColors {} |
Optional. True, if the gift can be used (after being upgraded) to customize a user's appearance.
Definition at line 32 of file Gift.hpp.
◆ id
| std::string tgbotxx::Gift::id |
Unique identifier of the gift.
Definition at line 17 of file Gift.hpp.
◆ isPremium
| bool tgbotxx::Gift::isPremium {} |
Optional. True, if the gift can only be purchased by Telegram Premium subscribers.
Definition at line 29 of file Gift.hpp.
◆ personalRemainingCount
| std::int64_t tgbotxx::Gift::personalRemainingCount {} |
Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only.
Definition at line 44 of file Gift.hpp.
◆ personalTotalCount
| std::int64_t tgbotxx::Gift::personalTotalCount {} |
Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only.
Definition at line 41 of file Gift.hpp.
◆ publisherChat
| Ptr<Chat> tgbotxx::Gift::publisherChat |
Optional. Information about the chat that published the gift.
Definition at line 53 of file Gift.hpp.
◆ remainingCount
| std::int64_t tgbotxx::Gift::remainingCount {} |
Optional. The number of remaining gifts of this type that can be sent; for limited gifts only.
Definition at line 38 of file Gift.hpp.
◆ starCount
| std::int64_t tgbotxx::Gift::starCount {} |
The number of Telegram Stars that must be paid to send the sticker.
Definition at line 23 of file Gift.hpp.
◆ sticker
The sticker that represents the gift.
Definition at line 20 of file Gift.hpp.
◆ totalCount
| std::int64_t tgbotxx::Gift::totalCount {} |
Optional. The total number of the gifts of this type that can be sent; for limited gifts only.
Definition at line 35 of file Gift.hpp.
◆ uniqueGiftVariantCount
| std::int64_t tgbotxx::Gift::uniqueGiftVariantCount {} |
Optional. The total number of different unique gifts that can be obtained by upgrading the gift.
Definition at line 50 of file Gift.hpp.
◆ upgradeStarCount
| std::int64_t tgbotxx::Gift::upgradeStarCount {} |
Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one.
Definition at line 26 of file Gift.hpp.
The documentation for this struct was generated from the following file: