main.py: added temporary fix for MarkdownV2 support

This commit is contained in:
dymik739 2023-09-05 11:46:59 +03:00
parent 87424c8786
commit 1504e03e13
1 changed files with 3 additions and 5 deletions

View File

@ -192,11 +192,9 @@ def queue_processor():
if response:
# protecting output
response = response.replace("(", "\\(")
response = response.replace(")", "\\)")
response = response.replace("!", "\\!")
response = response.replace(".", "\\.")
response = response.replace("=", "\\=")
symbols_to_escape = ['[', ']', '(', ')', '~', '`', '>', '#', '+', '-', '=', '|', '{', '}', '.', '!']
for symbol in symbols_to_escape:
response = response.replace(symbol, f"\\{symbol}")
updater.bot.send_message(chat_id=msg.chat.id, text=response,
disable_web_page_preview=True,