mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
fix: simplify code
json.loads(button.to_json()) equals to button.to_dict()
This commit is contained in:
parent
698b4371e6
commit
9ab906e60c
@ -1021,7 +1021,7 @@ class InlineKeyboardMarkup(Dictionaryable, JsonSerializable, JsonDeserializable)
|
|||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
json_dict = dict()
|
json_dict = dict()
|
||||||
json_dict['inline_keyboard'] = [[json.loads(button.to_json()) for button in row] for row in self.keyboard]
|
json_dict['inline_keyboard'] = [[button.to_dict() for button in row] for row in self.keyboard]
|
||||||
return json_dict
|
return json_dict
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user