Skip to content

Commit 0877661

Browse files
committed
Change callback_data type to bytes for request_callback_answer
Fixes #161
1 parent b6303ff commit 0877661

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pyrogram/client/methods/bots/request_callback_answer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class RequestCallbackAnswer(BaseClient):
2424
def request_callback_answer(self,
2525
chat_id: int or str,
2626
message_id: int,
27-
callback_data: str):
27+
callback_data: bytes):
2828
"""Use this method to request a callback answer from bots. This is the equivalent of clicking an
2929
inline button containing callback data.
3030
@@ -37,7 +37,7 @@ def request_callback_answer(self,
3737
message_id (``int``):
3838
The message id the inline keyboard is attached on.
3939
40-
callback_data (``str``):
40+
callback_data (``bytes``):
4141
Callback data associated with the inline button you want to get the answer from.
4242
4343
Returns:
@@ -52,7 +52,7 @@ def request_callback_answer(self,
5252
functions.messages.GetBotCallbackAnswer(
5353
peer=self.resolve_peer(chat_id),
5454
msg_id=message_id,
55-
data=callback_data.encode()
55+
data=callback_data
5656
),
5757
retries=0,
5858
timeout=10

0 commit comments

Comments
 (0)