From 2545724a6fb31006103b98e38d2970b5d36232ed Mon Sep 17 00:00:00 2001 From: Pieter van den Ham Date: Thu, 19 May 2016 10:02:59 +0200 Subject: [PATCH] Fix #164 --- telebot/types.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/telebot/types.py b/telebot/types.py index fc37605..1593216 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -3,6 +3,8 @@ import json import six +import util + class JsonSerializable: """ @@ -553,7 +555,7 @@ class ReplyKeyboardMarkup(JsonSerializable): i = 1 row = [] for button in args: - if isinstance(button, str): + if util.is_string(button): row.append({'text': button}) else: row.append(button.to_dic()) @@ -574,7 +576,7 @@ class ReplyKeyboardMarkup(JsonSerializable): """ btn_array = [] for button in args: - if isinstance(button, str): + if util.is_string(button): btn_array.append({'text': button}) else: btn_array.append(button.to_dic())