Skip to content

Commit

Permalink
pyrofork: Fix send_gift method
Browse files Browse the repository at this point in the history
Signed-off-by: Yasir <[email protected]>
  • Loading branch information
KurimuzonAkuma authored and yasirarism committed Feb 3, 2025
1 parent ad0aed4 commit 5e72850
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pyrogram/methods/payments/send_gift.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,10 @@ async def send_gift(
"""
peer = await self.resolve_peer(chat_id)

if not isinstance(peer, (raw.types.InputPeerUser, raw.types.InputPeerSelf)):
raise ValueError("chat_id must belong to a user.")

text, entities = (await utils.parse_text_entities(self, text, parse_mode, entities)).values()

invoice = raw.types.InputInvoiceStarGift(
user_id=peer,
peer=peer,
gift_id=gift_id,
hide_name=hide_my_name,
include_upgrade=pay_for_upgrade,
Expand Down

0 comments on commit 5e72850

Please sign in to comment.