core: log responses to stdout first, then send as a Telegram message

This commit is contained in:
dymik739 2023-11-04 13:17:22 +02:00
parent a7bbb1c1cc
commit 2b8105d2a8
1 changed files with 2 additions and 2 deletions

View File

@ -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