mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-03 07:45:14 +00:00
Automatically coerce any text to string for keyboard buttons
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user