Skip to content

giftPremiumWithStars

Function · TDLib 1.8.67 · d1085f9c

Allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars; for bots only

giftPremiumWithStars(
  user_id: int53,
  star_count: int53,
  month_count: int32,
  text: FormattedText
) → Ok

user_id

int53

Identifier of the user who will receive Telegram Premium

star_count

int53

The number of Telegram Stars to pay for subscription

month_count

int32

Number of months the Telegram Premium subscription will be active for the user

text

FormattedText

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