mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Change callback_data type to bytes for request_callback_answer
Fixes #161
This commit is contained in:
parent
b6303ff8cf
commit
08776619a7
@ -24,7 +24,7 @@ class RequestCallbackAnswer(BaseClient):
|
|||||||
def request_callback_answer(self,
|
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: bytes):
|
||||||
"""Use this method to request a callback answer from bots. This is the equivalent of clicking an
|
"""Use this method to request a callback answer from bots. This is the equivalent of clicking an
|
||||||
inline button containing callback data.
|
inline button containing callback data.
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ class RequestCallbackAnswer(BaseClient):
|
|||||||
message_id (``int``):
|
message_id (``int``):
|
||||||
The message id the inline keyboard is attached on.
|
The message id the inline keyboard is attached on.
|
||||||
|
|
||||||
callback_data (``str``):
|
callback_data (``bytes``):
|
||||||
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.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -52,7 +52,7 @@ class RequestCallbackAnswer(BaseClient):
|
|||||||
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,
|
||||||
data=callback_data.encode()
|
data=callback_data
|
||||||
),
|
),
|
||||||
retries=0,
|
retries=0,
|
||||||
timeout=10
|
timeout=10
|
||||||
|
Loading…
Reference in New Issue
Block a user