mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix #164
This commit is contained in:
parent
b8770e2c04
commit
2545724a6f
@ -3,6 +3,8 @@
|
|||||||
import json
|
import json
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
import util
|
||||||
|
|
||||||
|
|
||||||
class JsonSerializable:
|
class JsonSerializable:
|
||||||
"""
|
"""
|
||||||
@ -553,7 +555,7 @@ class ReplyKeyboardMarkup(JsonSerializable):
|
|||||||
i = 1
|
i = 1
|
||||||
row = []
|
row = []
|
||||||
for button in args:
|
for button in args:
|
||||||
if isinstance(button, str):
|
if util.is_string(button):
|
||||||
row.append({'text': button})
|
row.append({'text': button})
|
||||||
else:
|
else:
|
||||||
row.append(button.to_dic())
|
row.append(button.to_dic())
|
||||||
@ -574,7 +576,7 @@ class ReplyKeyboardMarkup(JsonSerializable):
|
|||||||
"""
|
"""
|
||||||
btn_array = []
|
btn_array = []
|
||||||
for button in args:
|
for button in args:
|
||||||
if isinstance(button, str):
|
if util.is_string(button):
|
||||||
btn_array.append({'text': button})
|
btn_array.append({'text': button})
|
||||||
else:
|
else:
|
||||||
btn_array.append(button.to_dic())
|
btn_array.append(button.to_dic())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user