Skip to content

Commit 1058822

Browse files
authored
Merge pull request eternnoir#266 from Yolley/patch-1
Added isinstance for bytes to function 'add' in ReplyKeyboardMarkup
2 parents 57a57c8 + d14bd9a commit 1058822

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎telebot/types.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,8 @@ def add(self, *args):
625625
for button in args:
626626
if util.is_string(button):
627627
row.append({'text': button})
628+
elif isinstance(button, bytes):
629+
row.append({'text': button.decode('utf-8')})
628630
else:
629631
row.append(button.to_dic())
630632
if i % self.row_width == 0:

0 commit comments

Comments
 (0)