From 08776619a78035da4ed5a82d6b191c159df4bab6 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Tue, 20 Nov 2018 16:03:26 +0100 Subject: [PATCH] Change callback_data type to bytes for request_callback_answer Fixes #161 --- pyrogram/client/methods/bots/request_callback_answer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyrogram/client/methods/bots/request_callback_answer.py b/pyrogram/client/methods/bots/request_callback_answer.py index c2c7e312..470ad15a 100644 --- a/pyrogram/client/methods/bots/request_callback_answer.py +++ b/pyrogram/client/methods/bots/request_callback_answer.py @@ -24,7 +24,7 @@ class RequestCallbackAnswer(BaseClient): def request_callback_answer(self, chat_id: int or str, 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 inline button containing callback data. @@ -37,7 +37,7 @@ class RequestCallbackAnswer(BaseClient): message_id (``int``): 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. Returns: @@ -52,7 +52,7 @@ class RequestCallbackAnswer(BaseClient): functions.messages.GetBotCallbackAnswer( peer=self.resolve_peer(chat_id), msg_id=message_id, - data=callback_data.encode() + data=callback_data ), retries=0, timeout=10