mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-04 22:34:52 +00:00
Make request_callback_answer async
This commit is contained in:
parent
811e67c229
commit
7ba2906532
1 changed files with 5 additions and 5 deletions
|
|
@ -21,10 +21,10 @@ from pyrogram.client.ext import BaseClient
|
||||||
|
|
||||||
|
|
||||||
class RequestCallbackAnswer(BaseClient):
|
class RequestCallbackAnswer(BaseClient):
|
||||||
def request_callback_answer(self,
|
async def request_callback_answer(self,
|
||||||
chat_id: int or str,
|
chat_id: int or str,
|
||||||
message_id: int,
|
message_id: int,
|
||||||
callback_data: str):
|
callback_data: str):
|
||||||
"""Use this method to request a callback answer from bots. This is the equivalent of clicking an inline button
|
"""Use this method to request a callback answer from bots. This is the equivalent of clicking an inline button
|
||||||
containing callback data. The answer contains info useful for clients to display a notification at the top of
|
containing callback data. The answer contains info useful for clients to display a notification at the top of
|
||||||
the chat screen or as an alert.
|
the chat screen or as an alert.
|
||||||
|
|
@ -42,7 +42,7 @@ class RequestCallbackAnswer(BaseClient):
|
||||||
callback_data (``str``):
|
callback_data (``str``):
|
||||||
Callback data associated with the inline button you want to get the answer from.
|
Callback data associated with the inline button you want to get the answer from.
|
||||||
"""
|
"""
|
||||||
return self.send(
|
return await self.send(
|
||||||
functions.messages.GetBotCallbackAnswer(
|
functions.messages.GetBotCallbackAnswer(
|
||||||
peer=self.resolve_peer(chat_id),
|
peer=self.resolve_peer(chat_id),
|
||||||
msg_id=message_id,
|
msg_id=message_id,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue