gift_premium_with_stars()

Client.gift_premium_with_stars()

Allows to buy a Telegram Premium subscription for another user with payment in Telegram Stars.

Usable by Users Bots
Parameters:
  • user_id (int | str) – Unique identifier (int) or username (str) of the target chat you want to transfer the star gift to. For your personal cloud (Saved Messages) you can simply use “me” or “self”. For a contact that exists in your Telegram address book you can use his phone number (str).

  • month_count (int) – Number of months the Telegram Premium subscription will be active for the user.

  • star_count (int, optional) – The number of Telegram Stars to pay for subscription.

Returns:

Message – On success, the sent message is returned.

Example

await app.gift_premium_with_stars(user_id=123, month_count=3)