tgbot-cpp
Loading...
Searching...
No Matches
TgBot::OwnedGiftRegular Struct Reference

Describes a regular gift owned by a user or a chat. More...

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<OwnedGiftRegular>

Public Attributes

std::string type { TYPE }
 Type of the gift, always “regular”
std::shared_ptr< Giftgift { }
 Information about the regular gift.
std::optional< std::string > ownedGiftId { }
 Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only.
std::shared_ptr< UsersenderUser { }
 Optional. Sender of the gift if it is a known user.
std::int32_t sendDate { }
 Date the gift was sent in Unix time.
std::optional< std::string > text { }
 Optional. Text of the message that was added to the gift.
std::optional< std::vector< std::shared_ptr< MessageEntity > > > entities { }
 Optional. Special entities that appear in the text.
std::optional< bool > isPrivate { }
 Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.
std::optional< bool > isSaved { }
 Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only.
std::optional< bool > canBeUpgraded { }
 Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only.
std::optional< bool > wasRefunded { }
 Optional. True, if the gift was refunded and isn't available anymore.
std::optional< std::int32_t > convertStarCount { }
 Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only.
std::optional< std::int32_t > prepaidUpgradeStarCount { }
 Optional. Number of Telegram Stars that were paid for the ability to upgrade the gift.
std::optional< bool > isUpgradeSeparate { }
 Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only.
std::optional< std::int32_t > uniqueGiftNumber { }
 Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift.

Static Public Attributes

static TGBOT_API const std::string TYPE

Detailed Description

Describes a regular gift owned by a user or a chat.

Definition at line 9981 of file Types.h.

Member Typedef Documentation

◆ Ptr

Definition at line 9982 of file Types.h.

Member Data Documentation

◆ canBeUpgraded

std::optional<bool> TgBot::OwnedGiftRegular::canBeUpgraded { }

Optional. True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only.

Definition at line 10038 of file Types.h.

◆ convertStarCount

std::optional<std::int32_t> TgBot::OwnedGiftRegular::convertStarCount { }

Optional. Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars; for gifts received on behalf of business accounts only.

Definition at line 10050 of file Types.h.

◆ entities

std::optional<std::vector<std::shared_ptr<MessageEntity> > > TgBot::OwnedGiftRegular::entities { }

Optional. Special entities that appear in the text.

Definition at line 10020 of file Types.h.

◆ gift

std::shared_ptr<Gift> TgBot::OwnedGiftRegular::gift { }

Information about the regular gift.

Definition at line 9994 of file Types.h.

◆ isPrivate

std::optional<bool> TgBot::OwnedGiftRegular::isPrivate { }

Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.

Definition at line 10026 of file Types.h.

◆ isSaved

std::optional<bool> TgBot::OwnedGiftRegular::isSaved { }

Optional. True, if the gift is displayed on the account's profile page; for gifts received on behalf of business accounts only.

Definition at line 10032 of file Types.h.

◆ isUpgradeSeparate

std::optional<bool> TgBot::OwnedGiftRegular::isUpgradeSeparate { }

Optional. True, if the gift's upgrade was purchased after the gift was sent; for gifts received on behalf of business accounts only.

Definition at line 10061 of file Types.h.

◆ ownedGiftId

std::optional<std::string> TgBot::OwnedGiftRegular::ownedGiftId { }

Optional. Unique identifier of the gift for the bot; for gifts received on behalf of business accounts only.

Definition at line 10000 of file Types.h.

◆ prepaidUpgradeStarCount

std::optional<std::int32_t> TgBot::OwnedGiftRegular::prepaidUpgradeStarCount { }

Optional. Number of Telegram Stars that were paid for the ability to upgrade the gift.

Definition at line 10055 of file Types.h.

◆ sendDate

std::int32_t TgBot::OwnedGiftRegular::sendDate { }

Date the gift was sent in Unix time.

Definition at line 10010 of file Types.h.

◆ senderUser

std::shared_ptr<User> TgBot::OwnedGiftRegular::senderUser { }

Optional. Sender of the gift if it is a known user.

Definition at line 10005 of file Types.h.

◆ text

std::optional<std::string> TgBot::OwnedGiftRegular::text { }

Optional. Text of the message that was added to the gift.

Definition at line 10015 of file Types.h.

◆ TYPE

TGBOT_API const std::string TgBot::OwnedGiftRegular::TYPE
static

Definition at line 9984 of file Types.h.

◆ type

std::string TgBot::OwnedGiftRegular::type { TYPE }

Type of the gift, always “regular”

Definition at line 9989 of file Types.h.

◆ uniqueGiftNumber

std::optional<std::int32_t> TgBot::OwnedGiftRegular::uniqueGiftNumber { }

Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift.

Definition at line 10067 of file Types.h.

◆ wasRefunded

std::optional<bool> TgBot::OwnedGiftRegular::wasRefunded { }

Optional. True, if the gift was refunded and isn't available anymore.

Definition at line 10043 of file Types.h.


The documentation for this struct was generated from the following file: