From bd1f171f517417186451c135246d002a1f71972b Mon Sep 17 00:00:00 2001 From: Francisco Demartino Date: Fri, 23 Oct 2015 16:48:26 -0300 Subject: [PATCH] Remove `.encode('utf-8')` from echobot This was making the bot throw TypeError on py3. Closes #86 --- examples/echobot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/echobot.py b/examples/echobot.py index 67b3c5527..e03599bff 100644 --- a/examples/echobot.py +++ b/examples/echobot.py @@ -51,12 +51,12 @@ def echo(bot): for update in bot.getUpdates(offset=LAST_UPDATE_ID, timeout=10): # chat_id is required to reply any message chat_id = update.message.chat_id - message = update.message.text.encode('utf-8') + reply_text = update.message.text - if (message): + if (reply_text): # Reply the message bot.sendMessage(chat_id=chat_id, - text=message) + text=reply_text) # Updates global offset to get the new updates LAST_UPDATE_ID = update.update_id + 1