Class TdApi.GiftPremiumWithStars

Enclosing class:
TdApi

public static class TdApi.GiftPremiumWithStars extends TdApi.Function<TdApi.Ok>
Allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars; for bots only.

Returns Ok

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Identifier uniquely determining type of the object.
    int
    Number of months the Telegram Premium subscription will be active for the user.
    long
    The number of Telegram Stars to pay for subscription.
    Text to show to the user receiving Telegram Premium; 0-getOption("gift_text_length_max") characters.
    long
    Identifier of the user which will receive Telegram Premium.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for a function, which allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars; for bots only.
    GiftPremiumWithStars(long userId, long starCount, int monthCount, TdApi.FormattedText text)
    Creates a function, which allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars; for bots only.
  • 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.Function

    toString

    Methods inherited from class java.lang.Object

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

    • userId

      public long userId
      Identifier of the user which will receive Telegram Premium.
    • starCount

      public long starCount
      The number of Telegram Stars to pay for subscription.
    • monthCount

      public int monthCount
      Number of months the Telegram Premium subscription will be active for the user.
    • text

      public TdApi.FormattedText text
      Text to show to the user receiving Telegram Premium; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • GiftPremiumWithStars

      public GiftPremiumWithStars()
      Default constructor for a function, which allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars; for bots only.

      Returns Ok

    • GiftPremiumWithStars

      public GiftPremiumWithStars(long userId, long starCount, int monthCount, TdApi.FormattedText text)
      Creates a function, which allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars; for bots only.

      Returns Ok

      Parameters:
      userId - Identifier of the user which will receive Telegram Premium.
      starCount - The number of Telegram Stars to pay for subscription.
      monthCount - Number of months the Telegram Premium subscription will be active for the user.
      text - Text to show to the user receiving Telegram Premium; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed.
  • 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