mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Add isinstance for bytes to function 'add' in ReplyKeyboardMarkup
All explanation is here https://github.com/eternnoir/pyTelegramBotAPI/issues/265
This commit is contained in:
parent
c168feea32
commit
d14bd9a36b
@ -619,6 +619,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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user