OriginProtocol / telegram-moderator

Telegram bot for controlling spam, logging, and more
MIT License
112 stars 50 forks source link

Can't parse entities: can't find end of the entity starting at byte offset 161 #26

Open mikeshultz opened 4 years ago

mikeshultz commented 4 years ago

Seen on a recent command (/price) in the spanish channel.

Can't parse entities: can't find end of the entity starting at byte offset 161

[Will update with message details later.]

mikeshultz commented 4 years ago

Relevant logs:

2020-06-19T19:51:13.773259+00:00 app[worker.1]: command: /price seen in chat_id -1001250600509
2020-06-19T19:51:14.786386+00:00 app[worker.1]: Update '{'update_id': 291083799, 'message': {'message_id': 7120, 'date': 1592596273, 'chat': {'id': -1001250600509, 'type': 'supergroup', 'title': 'Origin Protocol Spanish', 'username': 'OriginProtocolSpanish'}, 'text': '/price', 'entities': [{'type': 'bot_command', 'offset': 0, 'length': 6}], 'caption_entities': [], 'photo': [], 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'from': {'id': 956009817, 'first_name': 'Saul M.', 'is_bot': False, 'username': 'Saul_29', 'language_code': 'es'}, 'new_chat_member': None}, '_effective_user': {'id': 956009817, 'first_name': 'Saul M.', 'is_bot': False, 'username': 'Saul_29', 'language_code': 'es'}, '_effective_message': {'message_id': 7120, 'date': 1592596273, 'chat': {'id': -1001250600509, 'type': 'supergroup', 'title': 'Origin Protocol Spanish', 'username': 'OriginProtocolSpanish'}, 'text': '/price', 'entities': [{'type': 'bot_command', 'offset': 0, 'length': 6}], 'caption_entities': [], 'photo': [], 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'from': {'id': 956009817, 'first_name': 'Saul M.', 'is_bot': False, 'username': 'Saul_29', 'language_code': 'es'}, 'new_chat_member': None}}' caused error 'Can't parse entities: can't find end of the entity starting at byte offset 161'