Automatically coerce any text to string for keyboard buttons

This commit is contained in:
Dan 2019-03-01 16:04:21 +01:00
parent b0c011c70c
commit 5294c21e97
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ class InlineKeyboardButton(PyrogramType):
callback_game: CallbackGame = None): callback_game: CallbackGame = None):
super().__init__(None) super().__init__(None)
self.text = text self.text = str(text)
self.url = url self.url = url
self.callback_data = callback_data self.callback_data = callback_data
self.switch_inline_query = switch_inline_query self.switch_inline_query = switch_inline_query

View File

@ -46,7 +46,7 @@ class KeyboardButton(PyrogramType):
request_location: bool = None): request_location: bool = None):
super().__init__(None) super().__init__(None)
self.text = text self.text = str(text)
self.request_contact = request_contact self.request_contact = request_contact
self.request_location = request_location self.request_location = request_location