core: log responses to stdout first, then send as a Telegram message
This commit is contained in:
parent
a7bbb1c1cc
commit
2b8105d2a8
4
main.py
4
main.py
|
@ -304,17 +304,17 @@ def queue_processor():
|
||||||
|
|
||||||
if response:
|
if response:
|
||||||
if not formatting:
|
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,
|
updater.bot.send_message(chat_id=msg.chat.id, text=response,
|
||||||
disable_web_page_preview=True)
|
disable_web_page_preview=True)
|
||||||
print(f"Responded using module {mod.path} ({mod.alias}) with text: {response}")
|
|
||||||
time.sleep(DELAY_AFTER_RESPONSE)
|
time.sleep(DELAY_AFTER_RESPONSE)
|
||||||
break
|
break
|
||||||
|
|
||||||
elif formatting in ["Markdown", "MarkdownV2", "HTML"]:
|
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,
|
updater.bot.send_message(chat_id=msg.chat.id, text=response,
|
||||||
disable_web_page_preview=True,
|
disable_web_page_preview=True,
|
||||||
parse_mode=formatting)
|
parse_mode=formatting)
|
||||||
print(f"Responded using module {mod.path} ({mod.alias}) with text (using {formatting}): {response}")
|
|
||||||
time.sleep(DELAY_AFTER_RESPONSE)
|
time.sleep(DELAY_AFTER_RESPONSE)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue