mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +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",
|
client: "pyrogram.Client",
|
||||||
shipping_query: "raw.types.updateBotShippingQuery",
|
shipping_query: "raw.types.updateBotShippingQuery",
|
||||||
users: dict
|
users: dict
|
||||||
) -> "PreCheckoutQuery":
|
) -> "types.PreCheckoutQuery":
|
||||||
# Try to decode pre-checkout query payload into string. If that fails, fallback to bytes instead of decoding by
|
# 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.
|
# ignoring/replacing errors, this way, button clicks will still work.
|
||||||
try:
|
try:
|
||||||
|
|
@ -72,7 +72,7 @@ class ShippingQuery(Object, Update):
|
||||||
except (UnicodeDecodeError, AttributeError):
|
except (UnicodeDecodeError, AttributeError):
|
||||||
payload = shipping_query.payload
|
payload = shipping_query.payload
|
||||||
|
|
||||||
return PreCheckoutQuery(
|
return types.PreCheckoutQuery(
|
||||||
id=str(shipping_query.query_id),
|
id=str(shipping_query.query_id),
|
||||||
from_user=types.User._parse(client, users[shipping_query.user_id]),
|
from_user=types.User._parse(client, users[shipping_query.user_id]),
|
||||||
invoice_payload=payload,
|
invoice_payload=payload,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue