mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Automatically coerce any text to string for keyboard buttons
This commit is contained in:
parent
b0c011c70c
commit
5294c21e97
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user