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

Describes a unique gift received and owned by a user or a chat. More...

#include <Types.h>

Public Types

using Ptr = std::shared_ptr<OwnedGiftUnique>

Public Attributes

std::string type { TYPE }
 Type of the gift, always “unique”
std::shared_ptr< UniqueGiftgift { }
 Information about the unique gift.
std::optional< std::string > ownedGiftId { }
 Optional. Unique identifier of the received 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< 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 > canBeTransferred { }
 Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only.
std::optional< std::int32_t > transferStarCount { }
 Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift.
std::optional< std::int32_t > nextTransferDate { }
 Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now.

Static Public Attributes

static TGBOT_API const std::string TYPE

Detailed Description

Describes a unique gift received and owned by a user or a chat.

Definition at line 10077 of file Types.h.

Member Typedef Documentation

◆ Ptr

using TgBot::OwnedGiftUnique::Ptr = std::shared_ptr<OwnedGiftUnique>

Definition at line 10078 of file Types.h.

Member Data Documentation

◆ canBeTransferred

std::optional<bool> TgBot::OwnedGiftUnique::canBeTransferred { }

Optional. True, if the gift can be transferred to another owner; for gifts received on behalf of business accounts only.

Definition at line 10118 of file Types.h.

◆ gift

std::shared_ptr<UniqueGift> TgBot::OwnedGiftUnique::gift { }

Information about the unique gift.

Definition at line 10090 of file Types.h.

◆ isSaved

std::optional<bool> TgBot::OwnedGiftUnique::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 10112 of file Types.h.

◆ nextTransferDate

std::optional<std::int32_t> TgBot::OwnedGiftUnique::nextTransferDate { }

Optional. Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now.

Definition at line 10130 of file Types.h.

◆ ownedGiftId

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

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

Definition at line 10096 of file Types.h.

◆ sendDate

std::int32_t TgBot::OwnedGiftUnique::sendDate { }

Date the gift was sent in Unix time.

Definition at line 10106 of file Types.h.

◆ senderUser

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

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

Definition at line 10101 of file Types.h.

◆ transferStarCount

std::optional<std::int32_t> TgBot::OwnedGiftUnique::transferStarCount { }

Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift.

Definition at line 10124 of file Types.h.

◆ TYPE

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

Definition at line 10080 of file Types.h.

◆ type

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

Type of the gift, always “unique”

Definition at line 10085 of file Types.h.


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