1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #266 from Yolley/patch-1

Added isinstance for bytes to function 'add' in ReplyKeyboardMarkup
This commit is contained in:
FrankWang 2016-12-13 10:02:58 +08:00 committed by GitHub
commit 1058822f85

View File

@ -625,6 +625,8 @@ class ReplyKeyboardMarkup(JsonSerializable):
for button in args:
if util.is_string(button):
row.append({'text': button})
elif isinstance(button, bytes):
row.append({'text': button.decode('utf-8')})
else:
row.append(button.to_dic())
if i % self.row_width == 0: