From 4ce09c2f79552348ed2668f4c901c5026ebf0b0b Mon Sep 17 00:00:00 2001 From: harwinder Date: Mon, 11 May 2026 18:03:49 -0400 Subject: [PATCH] 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. --- telegram_bot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/telegram_bot.py b/telegram_bot.py index 36de48f..9b18b13 100755 --- a/telegram_bot.py +++ b/telegram_bot.py @@ -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)