mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-28 00:56:19 +00:00
Add parse_inline_query util method
This commit is contained in:
parent
a9fe0fffc6
commit
c37dcb07cf
@ -506,6 +506,7 @@ def start():
|
|||||||
f.write("\n 0xb0700028: \"pyrogram.client.types.Dialog\",")
|
f.write("\n 0xb0700028: \"pyrogram.client.types.Dialog\",")
|
||||||
f.write("\n 0xb0700029: \"pyrogram.client.types.Dialogs\",")
|
f.write("\n 0xb0700029: \"pyrogram.client.types.Dialogs\",")
|
||||||
f.write("\n 0xb0700030: \"pyrogram.client.types.ChatMembers\",")
|
f.write("\n 0xb0700030: \"pyrogram.client.types.ChatMembers\",")
|
||||||
|
f.write("\n 0xb0700032: \"pyrogram.client.types.InlineQuery\"")
|
||||||
|
|
||||||
f.write("\n}\n")
|
f.write("\n}\n")
|
||||||
|
|
||||||
|
@ -889,6 +889,20 @@ def parse_inline_callback_query(client, callback_query, users):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def parse_inline_query(client, inline_query: types.UpdateBotInlineQuery, users):
|
||||||
|
return pyrogram_types.InlineQuery(
|
||||||
|
client=client,
|
||||||
|
id=str(inline_query.query_id),
|
||||||
|
from_user=parse_user(users[inline_query.user_id]),
|
||||||
|
query=inline_query.query,
|
||||||
|
offset=inline_query.offset,
|
||||||
|
location=pyrogram_types.Location(
|
||||||
|
longitude=inline_query.geo.long,
|
||||||
|
latitude=inline_query.geo.lat
|
||||||
|
) if inline_query.geo else None
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def parse_chat_full(
|
def parse_chat_full(
|
||||||
client,
|
client,
|
||||||
chat_full: types.messages.ChatFull or types.UserFull
|
chat_full: types.messages.ChatFull or types.UserFull
|
||||||
|
Loading…
Reference in New Issue
Block a user