Skip to content

Commit

Permalink
🐛 Bug: Fix the bug where error messages were not rendered in markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Jun 24, 2024
1 parent b322d3e commit 43762a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ async def command_bot(update, context, language=None, prompt=translator_prompt,
message = await context.bot.send_message(
chat_id=chatid,
message_thread_id=message_thread_id,
text=strings['message_api_none'][get_current_lang()],
text=escape(strings['message_api_none'][get_current_lang()]),
parse_mode='MarkdownV2',
reply_to_message_id=messageid,
)
Expand Down Expand Up @@ -228,7 +228,7 @@ async def command_bot(update, context, language=None, prompt=translator_prompt,
message = await context.bot.send_message(
chat_id=chatid,
message_thread_id=message_thread_id,
text=strings['message_command_text_none'][get_current_lang()],
text=escape(strings['message_command_text_none'][get_current_lang()]),
parse_mode='MarkdownV2',
reply_to_message_id=messageid,
)
Expand Down Expand Up @@ -262,7 +262,7 @@ async def getChatGPT(update, context, title, robot, message, chatid, messageid,
message = await context.bot.send_message(
chat_id=chatid,
message_thread_id=message_thread_id,
text=strings['message_think'][get_current_lang()],
text=escape(strings['message_think'][get_current_lang()]),
parse_mode='MarkdownV2',
reply_to_message_id=messageid,
)
Expand Down Expand Up @@ -525,7 +525,7 @@ async def reset_chat(update, context):
message = await context.bot.send_message(
chat_id=chatid,
message_thread_id=message_thread_id,
text=strings['message_reset'][get_current_lang()],
text=escape(strings['message_reset'][get_current_lang()]),
reply_markup=remove_keyboard,
)
await delete_message(update, context, message.message_id)
Expand Down

0 comments on commit 43762a6

Please sign in to comment.