From 5294c21e97e433f4b10b294273387f3120ba92f2 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 1 Mar 2019 16:04:21 +0100 Subject: [PATCH] Automatically coerce any text to string for keyboard buttons --- pyrogram/client/types/bots/inline_keyboard_button.py | 2 +- pyrogram/client/types/bots/keyboard_button.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/client/types/bots/inline_keyboard_button.py b/pyrogram/client/types/bots/inline_keyboard_button.py index cd30f373..cc829cb1 100644 --- a/pyrogram/client/types/bots/inline_keyboard_button.py +++ b/pyrogram/client/types/bots/inline_keyboard_button.py @@ -63,7 +63,7 @@ class InlineKeyboardButton(PyrogramType): callback_game: CallbackGame = None): super().__init__(None) - self.text = text + self.text = str(text) self.url = url self.callback_data = callback_data self.switch_inline_query = switch_inline_query diff --git a/pyrogram/client/types/bots/keyboard_button.py b/pyrogram/client/types/bots/keyboard_button.py index e93eccb3..3c7c2bd6 100644 --- a/pyrogram/client/types/bots/keyboard_button.py +++ b/pyrogram/client/types/bots/keyboard_button.py @@ -46,7 +46,7 @@ class KeyboardButton(PyrogramType): request_location: bool = None): super().__init__(None) - self.text = text + self.text = str(text) self.request_contact = request_contact self.request_location = request_location