mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-17 21:22:40 +00:00
Add missing awaits
This commit is contained in:
parent
5d163ebabc
commit
ac318831dc
@ -129,5 +129,5 @@ class BaseClient:
|
|||||||
async def get_chat_members_count(self, *args, **kwargs):
|
async def get_chat_members_count(self, *args, **kwargs):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def answer_inline_query(self, *args, **kwargs):
|
async def answer_inline_query(self, *args, **kwargs):
|
||||||
pass
|
pass
|
||||||
|
@ -24,7 +24,7 @@ from ...types.inline_mode import InlineQueryResult
|
|||||||
|
|
||||||
|
|
||||||
class AnswerInlineQuery(BaseClient):
|
class AnswerInlineQuery(BaseClient):
|
||||||
def answer_inline_query(
|
async def answer_inline_query(
|
||||||
self,
|
self,
|
||||||
inline_query_id: str,
|
inline_query_id: str,
|
||||||
results: List[InlineQueryResult],
|
results: List[InlineQueryResult],
|
||||||
@ -75,7 +75,7 @@ class AnswerInlineQuery(BaseClient):
|
|||||||
Returns:
|
Returns:
|
||||||
On success, True is returned.
|
On success, True is returned.
|
||||||
"""
|
"""
|
||||||
return self.send(
|
return await self.send(
|
||||||
functions.messages.SetInlineBotResults(
|
functions.messages.SetInlineBotResults(
|
||||||
query_id=int(inline_query_id),
|
query_id=int(inline_query_id),
|
||||||
results=[r.write() for r in results],
|
results=[r.write() for r in results],
|
||||||
|
@ -83,7 +83,7 @@ class InlineQuery(PyrogramType, Update):
|
|||||||
client=client
|
client=client
|
||||||
)
|
)
|
||||||
|
|
||||||
def answer(
|
async def answer(
|
||||||
self,
|
self,
|
||||||
results: List[InlineQueryResult],
|
results: List[InlineQueryResult],
|
||||||
cache_time: int = 300,
|
cache_time: int = 300,
|
||||||
@ -141,7 +141,7 @@ class InlineQuery(PyrogramType, Update):
|
|||||||
where they wanted to use the bot's inline capabilities.
|
where they wanted to use the bot's inline capabilities.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return self._client.answer_inline_query(
|
return await self._client.answer_inline_query(
|
||||||
inline_query_id=self.id,
|
inline_query_id=self.id,
|
||||||
results=results,
|
results=results,
|
||||||
cache_time=cache_time,
|
cache_time=cache_time,
|
||||||
|
Loading…
Reference in New Issue
Block a user