mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-30 20:34:51 +00:00
pyrofork: fix PreCheckoutQuery not defined in class ShippingQuery
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
d70927e5a2
commit
930da9b858
1 changed files with 2 additions and 2 deletions
|
|
@ -64,7 +64,7 @@ class ShippingQuery(Object, Update):
|
|||
client: "pyrogram.Client",
|
||||
shipping_query: "raw.types.updateBotShippingQuery",
|
||||
users: dict
|
||||
) -> "PreCheckoutQuery":
|
||||
) -> "types.PreCheckoutQuery":
|
||||
# Try to decode pre-checkout query payload into string. If that fails, fallback to bytes instead of decoding by
|
||||
# ignoring/replacing errors, this way, button clicks will still work.
|
||||
try:
|
||||
|
|
@ -72,7 +72,7 @@ class ShippingQuery(Object, Update):
|
|||
except (UnicodeDecodeError, AttributeError):
|
||||
payload = shipping_query.payload
|
||||
|
||||
return PreCheckoutQuery(
|
||||
return types.PreCheckoutQuery(
|
||||
id=str(shipping_query.query_id),
|
||||
from_user=types.User._parse(client, users[shipping_query.user_id]),
|
||||
invoice_payload=payload,
|
||||
|
|
|
|||
Loading…
Reference in a new issue