Package org.drinkless.tdlib
Class TdApi.GiftPremiumWithStars
- Enclosing class:
- TdApi
Allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars; for bots only.
Returns Ok
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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
ConstructorsConstructorDescriptionDefault 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 TypeMethodDescriptionint
Returns an identifier uniquely determining type of the object.Methods inherited from class org.drinkless.tdlib.TdApi.Function
toString
-
Field Details
-
userId
public long userIdIdentifier of the user which will receive Telegram Premium. -
starCount
public long starCountThe number of Telegram Stars to pay for subscription. -
monthCount
public int monthCountNumber 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. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier 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
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 classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-