upgrade_gift()¶
- Client.upgrade_gift()¶
Upgrade a given regular gift to a unique gift.
Usable by Users BotsNote
Requires the can_transfer_and_upgrade_gifts business bot right. Additionally requires the can_transfer_stars business bot right if the upgrade is paid.
- Parameters:
owned_gift_id (
str) – Unique identifier of the regular gift that should be upgraded to a unique one. For a user gift, you can use the message ID (int) of the gift message. For a channel gift, you can use the packed format chatID_savedID (str). For a upgraded gift, you can use the gift link.keep_original_details (
bool, optional) – Pass True to keep the original gift text, sender and receiver in the upgraded gift.star_count (
int, optional) – The amount of Telegram Stars required to pay for the upgrade.business_connection_id (
str, optional) – Unique identifier of the business connection. For bots only.
- Returns:
Message– On success, the sent message is returned.
Example
# Upgrade gift await app.upgrade_gift(owned_gift_id="123") # Upgrade gift in channel (owned_gift_id packed in format chatID_savedID) await app.upgrade_gift(owned_gift_id="123_456")