pyrofork: Fix send_gift method

Signed-off-by: Yasir <git@yasir.id>
This commit is contained in:
KurimuzonAkuma 2025-02-03 05:39:34 +00:00 committed by Yasir
parent ad0aed4cf3
commit 5e72850eee

View file

@ -77,13 +77,10 @@ class SendGift:
""" """
peer = await self.resolve_peer(chat_id) 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() text, entities = (await utils.parse_text_entities(self, text, parse_mode, entities)).values()
invoice = raw.types.InputInvoiceStarGift( invoice = raw.types.InputInvoiceStarGift(
user_id=peer, peer=peer,
gift_id=gift_id, gift_id=gift_id,
hide_name=hide_my_name, hide_name=hide_my_name,
include_upgrade=pay_for_upgrade, include_upgrade=pay_for_upgrade,