From 6c538f026d4ce32d247f65ac47fa3b6c51361c88 Mon Sep 17 00:00:00 2001 From: Yasir Aris Date: Sat, 4 Jan 2025 16:19:34 +0700 Subject: [PATCH] pyrofork: Add pay_for_upgrade in send_gift method Signed-off-by: Yasir Aris --- pyrogram/methods/business/send_gift.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyrogram/methods/business/send_gift.py b/pyrogram/methods/business/send_gift.py index 3f5a2f7d..368a9479 100644 --- a/pyrogram/methods/business/send_gift.py +++ b/pyrogram/methods/business/send_gift.py @@ -28,6 +28,7 @@ class SendGift: self: "pyrogram.Client", user_id: Union[int, str], gift_id: int, + pay_for_upgrade: Optional[bool] = None, text: Optional[str] = None, parse_mode: Optional["enums.ParseMode"] = None, entities: Optional[List["types.MessageEntity"]] = None, @@ -46,6 +47,9 @@ class SendGift: gift_id (``int``): Unique identifier of the gift to send. + pay_for_upgrade (``bool``, *optional*): + Pass True to pay for the gift upgrade from the sender's balance, thereby making the upgrade free for the receiver. + text (``str``, *optional*): Text of the message to be sent. 0-``gift_text_length_max`` characters. @@ -84,6 +88,7 @@ class SendGift: user_id=peer, gift_id=gift_id, hide_name=is_private, + include_upgrade=pay_for_upgrade, message=raw.types.TextWithEntities( text=text, entities=entities or [] ) if text else None