Class TdApi.MessageGift

Enclosing class:
TdApi

public static class TdApi.MessageGift extends TdApi.MessageContent
A regular gift was received or sent by the current user, or the current user was notified about a channel gift.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    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

    Constructors
    Constructor
    Description
    A 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 Type
    Method
    Description
    int
    Returns an identifier uniquely determining type of the object.

    Methods inherited from class org.drinkless.tdlib.TdApi.Object

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • gift

      public TdApi.Gift gift
      The gift.
    • senderId

      public TdApi.MessageSender senderId
      Sender of the gift.
    • receivedGiftId

      public String receivedGiftId
      Unique identifier of the received gift for the current user; only for the receiver of the gift.
    • text

      public TdApi.FormattedText text
      Message added to the gift.
    • sellStarCount

      public long 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

      public long prepaidUpgradeStarCount
      Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift.
    • isPrivate

      public boolean isPrivate
      True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them.
    • isSaved

      public boolean 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

      public boolean canBeUpgraded
      True, if the gift can be upgraded to a unique gift; only for the receiver of the gift.
    • wasConverted

      public boolean wasConverted
      True, if the gift was converted to Telegram Stars; only for the receiver of the gift.
    • wasUpgraded

      public boolean wasUpgraded
      True, if the gift was upgraded to a unique gift.
    • wasRefunded

      public boolean wasRefunded
      True, if the gift was refunded and isn't available anymore.
    • upgradedReceivedGiftId

      public String 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 CONSTRUCTOR
      Identifier 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 class TdApi.Object
      Returns:
      this.CONSTRUCTOR