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. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user