mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-04 22:34:52 +00:00
Change callback_data type to bytes for request_callback_answer
Fixes #161
This commit is contained in:
parent
b6303ff8cf
commit
08776619a7
1 changed files with 3 additions and 3 deletions
|
|
@ -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 a new issue