tdlib-obf API
Reference documentation for the public tdlib-obf API, generated from TDLib schemas and public headers
Loading...
Searching...
No Matches
td::td_api::messageGift Class Referencefinal

#include </home/runner/work/tdlib-obf/tdlib-obf/td/generate/auto/td/telegram/td_api.h>

Inheritance diagram for td::td_api::messageGift:
td::td_api::MessageContent td::td_api::Object td::TlObject

Public Member Functions

 messageGift ()
 
 messageGift (object_ptr< gift > &&gift_, object_ptr< MessageSender > &&sender_id_, object_ptr< MessageSender > &&receiver_id_, string const &received_gift_id_, object_ptr< formattedText > &&text_, int32 unique_gift_number_, int53 sell_star_count_, int53 prepaid_upgrade_star_count_, bool is_upgrade_separate_, bool is_from_auction_, bool is_private_, bool is_saved_, bool is_prepaid_upgrade_, bool can_be_upgraded_, bool was_converted_, bool was_upgraded_, bool was_refunded_, string const &upgraded_received_gift_id_, string const &prepaid_upgrade_hash_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Member Functions inherited from td::TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Public Attributes

object_ptr< giftgift_
 The gift.
 
object_ptr< MessageSendersender_id_
 Sender of the gift; may be null for outgoing messages about prepaid upgrade of gifts from unknown users.
 
object_ptr< MessageSenderreceiver_id_
 Receiver of the gift.
 
string received_gift_id_
 Unique identifier of the received gift for the current user; only for the receiver of the gift.
 
object_ptr< formattedTexttext_
 Message added to the gift.
 
int32 unique_gift_number_
 Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
 
int53 sell_star_count_
 Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can&#x27;t be sold by the receiver.
 
int53 prepaid_upgrade_star_count_
 Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
 
bool is_upgrade_separate_
 True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost.
 
bool is_from_auction_
 True, if the message is a notification about a gift won on an auction.
 
bool is_private_
 True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.
 
bool is_saved_
 True, if the gift is displayed on the user&#x27;s or the channel&#x27;s profile page; only for the receiver of the gift.
 
bool is_prepaid_upgrade_
 True, if the message is about prepaid upgrade of the gift by another user.
 
bool can_be_upgraded_
 True, if the gift can be upgraded to a unique gift; only for the receiver of the gift.
 
bool was_converted_
 True, if the gift was converted to Telegram Stars; only for the receiver of the gift.
 
bool was_upgraded_
 True, if the gift was upgraded to a unique gift.
 
bool was_refunded_
 True, if the gift was refunded and isn&#x27;t available anymore.
 
string upgraded_received_gift_id_
 Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift.
 
string prepaid_upgrade_hash_
 If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade.
 

Static Public Attributes

static const std::int32_t ID = -1990929579
 Identifier uniquely determining a type of the object.
 

Detailed Description

A regular gift was received or sent by the current user, or the current user was notified about a channel gift.

Definition at line 42211 of file td_api.h.

Constructor & Destructor Documentation

◆ messageGift() [1/2]

td::td_api::messageGift::messageGift ( )

A regular gift was received or sent by the current user, or the current user was notified about a channel gift.

◆ messageGift() [2/2]

td::td_api::messageGift::messageGift ( object_ptr< gift > &&  gift_,
object_ptr< MessageSender > &&  sender_id_,
object_ptr< MessageSender > &&  receiver_id_,
string const &  received_gift_id_,
object_ptr< formattedText > &&  text_,
int32  unique_gift_number_,
int53  sell_star_count_,
int53  prepaid_upgrade_star_count_,
bool  is_upgrade_separate_,
bool  is_from_auction_,
bool  is_private_,
bool  is_saved_,
bool  is_prepaid_upgrade_,
bool  can_be_upgraded_,
bool  was_converted_,
bool  was_upgraded_,
bool  was_refunded_,
string const &  upgraded_received_gift_id_,
string const &  prepaid_upgrade_hash_ 
)

A regular gift was received or sent by the current user, or the current user was notified about a channel gift.

Parameters
[in]gift_The gift.
[in]sender_id_Sender of the gift; may be null for outgoing messages about prepaid upgrade of gifts from unknown users.
[in]receiver_id_Receiver of the gift.
[in]received_gift_id_Unique identifier of the received gift for the current user; only for the receiver of the gift.
[in]text_Message added to the gift.
[in]unique_gift_number_Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.
[in]sell_star_count_Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can&#x27;t be sold by the receiver.
[in]prepaid_upgrade_star_count_Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
[in]is_upgrade_separate_True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost.
[in]is_from_auction_True, if the message is a notification about a gift won on an auction.
[in]is_private_True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.
[in]is_saved_True, if the gift is displayed on the user&#x27;s or the channel&#x27;s profile page; only for the receiver of the gift.
[in]is_prepaid_upgrade_True, if the message is about prepaid upgrade of the gift by another user.
[in]can_be_upgraded_True, if the gift can be upgraded to a unique gift; only for the receiver of the gift.
[in]was_converted_True, if the gift was converted to Telegram Stars; only for the receiver of the gift.
[in]was_upgraded_True, if the gift was upgraded to a unique gift.
[in]was_refunded_True, if the gift was refunded and isn&#x27;t available anymore.
[in]upgraded_received_gift_id_Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift.
[in]prepaid_upgrade_hash_If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade.

Member Function Documentation

◆ store()

void td::td_api::messageGift::store ( TlStorerToString &  s,
const char *  field_name 
) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements td::TlObject.

Member Data Documentation

◆ can_be_upgraded_

bool td::td_api::messageGift::can_be_upgraded_

True, if the gift can be upgraded to a unique gift; only for the receiver of the gift.

Definition at line 42248 of file td_api.h.

◆ gift_

object_ptr<gift> td::td_api::messageGift::gift_

The gift.

Definition at line 42222 of file td_api.h.

◆ ID

const std::int32_t td::td_api::messageGift::ID = -1990929579
static

Identifier uniquely determining a type of the object.

Definition at line 42291 of file td_api.h.

◆ is_from_auction_

bool td::td_api::messageGift::is_from_auction_

True, if the message is a notification about a gift won on an auction.

Definition at line 42240 of file td_api.h.

◆ is_prepaid_upgrade_

bool td::td_api::messageGift::is_prepaid_upgrade_

True, if the message is about prepaid upgrade of the gift by another user.

Definition at line 42246 of file td_api.h.

◆ is_private_

bool td::td_api::messageGift::is_private_

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 42242 of file td_api.h.

◆ is_saved_

bool td::td_api::messageGift::is_saved_

True, if the gift is displayed on the user&#x27;s or the channel&#x27;s profile page; only for the receiver of the gift.

Definition at line 42244 of file td_api.h.

◆ is_upgrade_separate_

bool td::td_api::messageGift::is_upgrade_separate_

True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost.

Definition at line 42238 of file td_api.h.

◆ prepaid_upgrade_hash_

string td::td_api::messageGift::prepaid_upgrade_hash_

If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade.

Definition at line 42258 of file td_api.h.

◆ prepaid_upgrade_star_count_

int53 td::td_api::messageGift::prepaid_upgrade_star_count_

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

Definition at line 42236 of file td_api.h.

◆ received_gift_id_

string td::td_api::messageGift::received_gift_id_

Unique identifier of the received gift for the current user; only for the receiver of the gift.

Definition at line 42228 of file td_api.h.

◆ receiver_id_

object_ptr<MessageSender> td::td_api::messageGift::receiver_id_

Receiver of the gift.

Definition at line 42226 of file td_api.h.

◆ sell_star_count_

int53 td::td_api::messageGift::sell_star_count_

Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can&#x27;t be sold by the receiver.

Definition at line 42234 of file td_api.h.

◆ sender_id_

object_ptr<MessageSender> td::td_api::messageGift::sender_id_

Sender of the gift; may be null for outgoing messages about prepaid upgrade of gifts from unknown users.

Definition at line 42224 of file td_api.h.

◆ text_

object_ptr<formattedText> td::td_api::messageGift::text_

Message added to the gift.

Definition at line 42230 of file td_api.h.

◆ unique_gift_number_

int32 td::td_api::messageGift::unique_gift_number_

Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned.

Definition at line 42232 of file td_api.h.

◆ upgraded_received_gift_id_

string td::td_api::messageGift::upgraded_received_gift_id_

Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift.

Definition at line 42256 of file td_api.h.

◆ was_converted_

bool td::td_api::messageGift::was_converted_

True, if the gift was converted to Telegram Stars; only for the receiver of the gift.

Definition at line 42250 of file td_api.h.

◆ was_refunded_

bool td::td_api::messageGift::was_refunded_

True, if the gift was refunded and isn&#x27;t available anymore.

Definition at line 42254 of file td_api.h.

◆ was_upgraded_

bool td::td_api::messageGift::was_upgraded_

True, if the gift was upgraded to a unique gift.

Definition at line 42252 of file td_api.h.


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