This object represents a gift that can be sent by the bot. https://core.telegram.org/bots/api#gift.
More...
#include <Gift.hpp>
|
| | Gift ()=default |
| |
| | Gift (const nl::json &json) |
| |
| nl::json | toJson () const |
| | Serializes this object to JSON.
|
| |
| void | fromJson (const nl::json &json) |
| | Deserializes this object from JSON.
|
| |
|
| 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.
|
| |
| 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.
|
| |
| 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 9 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 51 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 38 of file Gift.hpp.
◆ id
| std::string tgbotxx::Gift::id |
Unique identifier of the gift.
Definition at line 16 of file Gift.hpp.
◆ publisherChat
| Ptr<Chat> tgbotxx::Gift::publisherChat |
Optional. Information about the chat that published the gift.
Definition at line 34 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 31 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 22 of file Gift.hpp.
◆ sticker
The sticker that represents the gift.
Definition at line 19 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 28 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 25 of file Gift.hpp.
The documentation for this struct was generated from the following file: