X Tutup
Skip to content

Commit bd1f171

Browse files
committed
Remove .encode('utf-8') from echobot
This was making the bot throw TypeError on py3. Closes python-telegram-bot#86
1 parent 688d6af commit bd1f171

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/echobot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ def echo(bot):
5151
for update in bot.getUpdates(offset=LAST_UPDATE_ID, timeout=10):
5252
# chat_id is required to reply any message
5353
chat_id = update.message.chat_id
54-
message = update.message.text.encode('utf-8')
54+
reply_text = update.message.text
5555

56-
if (message):
56+
if (reply_text):
5757
# Reply the message
5858
bot.sendMessage(chat_id=chat_id,
59-
text=message)
59+
text=reply_text)
6060

6161
# Updates global offset to get the new updates
6262
LAST_UPDATE_ID = update.update_id + 1

0 commit comments

Comments
 (0)
X Tutup