From 93d45a7bcda01ee47384603c37eaa9265ede8d80 Mon Sep 17 00:00:00 2001 From: Anton Palgunov Date: Sat, 1 Apr 2023 21:55:52 +0100 Subject: [PATCH] better order of msgs --- Readme.md | 1 + Readme.ru.md | 0 bot.py | 4 ++-- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 Readme.ru.md diff --git a/Readme.md b/Readme.md index 18675f1..bf5497b 100644 --- a/Readme.md +++ b/Readme.md @@ -45,3 +45,4 @@ If you find any issues or have any suggestions for improving the bot, please fee ## License This project is licensed under the MIT License - see the `LICENSE` file for details. + diff --git a/Readme.ru.md b/Readme.ru.md new file mode 100644 index 0000000..e69de29 diff --git a/bot.py b/bot.py index fa2787c..f7c46e9 100644 --- a/bot.py +++ b/bot.py @@ -202,9 +202,9 @@ def handle_message(message): # Send the response back to the user with markdown formatting try: - ans = bot.edit_message_text(chat_id=message.chat.id, message_id=answer.message_id, text=response_text , parse_mode='Markdown') + ans = bot.edit_message_text(chat_id=message.chat.id, message_id=answer.message_id, text=f"Finish reason: {reason} \nCost: {cost}" ) # Send response text with reason and cost formated - bot.reply_to(ans, f"Finish reason: {reason} \nCost: {cost}") + bot.reply_to(ans, response_text, parse_mode='Markdown') except Exception as e: print(e) bot.reply_to(message, "Что-то пошло не так c ответом. Пробую другой метод...")