From 2b8105d2a8156963ac819c1ec1723ed0b1e19ae5 Mon Sep 17 00:00:00 2001 From: dymik739 Date: Sat, 4 Nov 2023 13:17:22 +0200 Subject: [PATCH] core: log responses to stdout first, then send as a Telegram message --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index f4e15c7..7b98c93 100644 --- a/main.py +++ b/main.py @@ -304,17 +304,17 @@ def queue_processor(): if response: if not formatting: + print(f"Responding using module {mod.path} ({mod.alias}) with text: {response}") updater.bot.send_message(chat_id=msg.chat.id, text=response, disable_web_page_preview=True) - print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}") time.sleep(DELAY_AFTER_RESPONSE) break elif formatting in ["Markdown", "MarkdownV2", "HTML"]: + print(f"Responding using module {mod.path} ({mod.alias}) with text (using {formatting}): {response}") updater.bot.send_message(chat_id=msg.chat.id, text=response, disable_web_page_preview=True, parse_mode=formatting) - print(f"Responded using module {mod.path} ({mod.alias}) with text (using {formatting}): {response}") time.sleep(DELAY_AFTER_RESPONSE) break