Skip to content

Commit 5294c21

Browse files
committed
Automatically coerce any text to string for keyboard buttons
1 parent b0c011c commit 5294c21

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pyrogram/client/types/bots/inline_keyboard_button.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self,
6363
callback_game: CallbackGame = None):
6464
super().__init__(None)
6565

66-
self.text = text
66+
self.text = str(text)
6767
self.url = url
6868
self.callback_data = callback_data
6969
self.switch_inline_query = switch_inline_query

pyrogram/client/types/bots/keyboard_button.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self,
4646
request_location: bool = None):
4747
super().__init__(None)
4848

49-
self.text = text
49+
self.text = str(text)
5050
self.request_contact = request_contact
5151
self.request_location = request_location
5252

0 commit comments

Comments
 (0)