mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-25 00:27:46 +01:00
Remove .encode('utf-8')
from echobot
This was making the bot throw TypeError on py3. Closes #86
This commit is contained in:
parent
688d6af541
commit
bd1f171f51
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue