Package org.drinkless.tdlib
Class TdApi.MessageGift
java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.MessageContent
org.drinkless.tdlib.TdApi.MessageGift
- Enclosing class:
- TdApi
A regular gift was received or sent by the current user, or the current user was notified about a channel gift.
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
True, if the gift can be upgraded to a unique gift; only for the receiver of the gift.static final int
Identifier uniquely determining type of the object.The gift.boolean
True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.boolean
True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift.long
Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.Unique identifier of the received gift for the current user; only for the receiver of the gift.long
Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver.Sender of the gift.Message added to the gift.Identifier of the corresponding upgraded gift; may be empty if unknown.boolean
True, if the gift was converted to Telegram Stars; only for the receiver of the gift.boolean
True, if the gift was refunded and isn't available anymore.boolean
True, if the gift was upgraded to a unique gift. -
Constructor Summary
ConstructorsConstructorDescriptionA regular gift was received or sent by the current user, or the current user was notified about a channel gift.MessageGift
(TdApi.Gift gift, TdApi.MessageSender senderId, String receivedGiftId, TdApi.FormattedText text, long sellStarCount, long prepaidUpgradeStarCount, boolean isPrivate, boolean isSaved, boolean canBeUpgraded, boolean wasConverted, boolean wasUpgraded, boolean wasRefunded, String upgradedReceivedGiftId) A regular gift was received or sent by the current user, or the current user was notified about a channel gift. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns an identifier uniquely determining type of the object.Methods inherited from class org.drinkless.tdlib.TdApi.Object
toString
-
Field Details
-
gift
The gift. -
senderId
Sender of the gift. -
receivedGiftId
Unique identifier of the received gift for the current user; only for the receiver of the gift. -
text
Message added to the gift. -
sellStarCount
public long sellStarCountNumber of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver. -
prepaidUpgradeStarCount
public long prepaidUpgradeStarCountNumber of Telegram Stars that were paid by the sender for the ability to upgrade the gift. -
isPrivate
public boolean isPrivateTrue, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them. -
isSaved
public boolean isSavedTrue, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift. -
canBeUpgraded
public boolean canBeUpgradedTrue, if the gift can be upgraded to a unique gift; only for the receiver of the gift. -
wasConverted
public boolean wasConvertedTrue, if the gift was converted to Telegram Stars; only for the receiver of the gift. -
wasUpgraded
public boolean wasUpgradedTrue, if the gift was upgraded to a unique gift. -
wasRefunded
public boolean wasRefundedTrue, if the gift was refunded and isn't available anymore. -
upgradedReceivedGiftId
Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier uniquely determining type of the object.- See Also:
-
-
Constructor Details
-
MessageGift
public MessageGift()A regular gift was received or sent by the current user, or the current user was notified about a channel gift. -
MessageGift
public MessageGift(TdApi.Gift gift, TdApi.MessageSender senderId, String receivedGiftId, TdApi.FormattedText text, long sellStarCount, long prepaidUpgradeStarCount, boolean isPrivate, boolean isSaved, boolean canBeUpgraded, boolean wasConverted, boolean wasUpgraded, boolean wasRefunded, String upgradedReceivedGiftId) A regular gift was received or sent by the current user, or the current user was notified about a channel gift.- Parameters:
gift
- The gift.senderId
- Sender of the gift.receivedGiftId
- Unique identifier of the received gift for the current user; only for the receiver of the gift.text
- Message added to the gift.sellStarCount
- Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the receiver.prepaidUpgradeStarCount
- Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.isPrivate
- True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.isSaved
- True, if the gift is displayed on the user's or the channel's profile page; only for the receiver of the gift.canBeUpgraded
- True, if the gift can be upgraded to a unique gift; only for the receiver of the gift.wasConverted
- True, if the gift was converted to Telegram Stars; only for the receiver of the gift.wasUpgraded
- True, if the gift was upgraded to a unique gift.wasRefunded
- True, if the gift was refunded and isn't available anymore.upgradedReceivedGiftId
- Identifier of the corresponding upgraded gift; may be empty if unknown. Use getReceivedGift to get information about the gift.
-
-
Method Details
-
getConstructor
public int getConstructor()Description copied from class:TdApi.Object
Returns an identifier uniquely determining type of the object.- Specified by:
getConstructor
in classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-