Suppress Telegram messages when no actionable signals found

Auto-scan still runs and updates the level cache every cycle,
but only sends to Telegram when quality A+/A/B/C signals exist.
This commit is contained in:
harwinder
2026-05-11 18:03:49 -04:00
parent 02eedcc875
commit 4ce09c2f79
+6 -1
View File
@@ -390,9 +390,14 @@ async def _scan_timeframe(
_update_level_cache(reports)
summary = _format_scan_summary(reports, tf)
actionable = [r for r in reports if r.signal_quality in ("A+", "A", "B", "C")]
if not actionable:
logger.info(f"{tf.value} scan: no actionable signals — skipping Telegram message")
return
summary = _format_scan_summary(reports, tf)
for chat_id in list(_autoscan_chats):
try:
await bot.send_message(chat_id, summary, parse_mode=ParseMode.MARKDOWN)