send_gift()¶
- Client.send_gift()¶
Send star gift.
Usable by Users Bots
- Parameters:¶
chat_id (
int
|str
) – Unique identifier (int) or username (str) of the target chat. 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).gift_id (
int
) – Unique identifier of star gift.text (
str
, optional) – Text of the message to be sent.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.hide_my_name (
bool
, optional) – If True, your name will be hidden from visitors to the gift recipient’s profile.pay_for_upgrade (
bool
, optional) – If True, gift upgrade will be paid from the bot’s balance, thereby making the upgrade free for the receiver. For bots only. Defaults to None.
- Returns:¶
bool
– On success, True is returned.
Example
# Send gift app.send_gift(chat_id=chat_id, star_gift_id=123)