diff --git a/pyrogram/client/types/bots/inline_keyboard_button.py b/pyrogram/client/types/bots/inline_keyboard_button.py index ce93d96b..3d6c7b6b 100644 --- a/pyrogram/client/types/bots/inline_keyboard_button.py +++ b/pyrogram/client/types/bots/inline_keyboard_button.py @@ -59,7 +59,7 @@ class InlineKeyboardButton(Object): def __init__( self, text: str, - callback_data: str = None, + callback_data: bytes = None, url: str = None, switch_inline_query: str = None, switch_inline_query_current_chat: str = None, @@ -102,7 +102,7 @@ class InlineKeyboardButton(Object): def write(self): if self.callback_data: - return KeyboardButtonCallback(self.text, self.callback_data.encode()) + return KeyboardButtonCallback(self.text, self.callback_data) if self.url: return KeyboardButtonUrl(self.text, self.url)