Fixed handling of non-ascii messages.

This commit is contained in:
Stan James 2018-01-28 23:22:37 -07:00
parent 919dd9e940
commit d67f73c3c5
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ This is a bot that logs public Group Chats to a Postgres Database.
```
- Create a Telegram group.
- Add your bot to the group like so: https://stackoverflow.com/questions/37338101/how-to-add-a-bot-to-a-telegram-group
- Your bot only sees commands. Use `/setprivacy` with `@BotFather` in order to allow it to see all messages in a group.
- Use `/setprivacy` with `@BotFather` in order to allow it to see all messages in a group.
## Running the bot

2
bot.py
View File

@ -39,7 +39,7 @@ def logger(bot, update):
else:
print("Something went wrong adding the user {}".format(user.id))
print("{} : {}".format(user.username,update.message.text))
print("{} : {}".format(user.username.encode('utf-8'),update.message.text.encode('utf-8')))
# DB queries