main.py: disable MarkdownV2 to avoid errors

This commit is contained in:
dymik739 2023-09-05 13:22:11 +03:00
parent 8cc68080e8
commit ebdae6256e
1 changed files with 3 additions and 2 deletions

View File

@ -191,14 +191,15 @@ def queue_processor():
response = mod.process(msg) response = mod.process(msg)
if response: if response:
'''
# protecting output # protecting output
symbols_to_escape = ['[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!'] symbols_to_escape = ['[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!']
for symbol in symbols_to_escape: for symbol in symbols_to_escape:
response = response.replace(symbol, f"\\{symbol}") response = response.replace(symbol, f"\\{symbol}")
'''
updater.bot.send_message(chat_id=msg.chat.id, text=response, updater.bot.send_message(chat_id=msg.chat.id, text=response,
disable_web_page_preview=True, disable_web_page_preview=True)
parse_mode="MarkdownV2")
print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}") print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}")
break break