gift_premium_with_stars()¶
- async 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.text (
str|FormattedText) – The original text.parse_mode (
ParseMode, optional) – By default, texts are parsed using both Markdown and HTML styles. You can combine both syntaxes together.entities (List of
MessageEntity, optional) – List of special entities that appear in message text, which can be specified instead of parse_mode.
- Returns:
Message– On success, the sent message is returned.
Example
await app.gift_premium_with_stars(user_id=123, month_count=3)