diff --git a/routes/openclaw_bot_routes.py b/routes/openclaw_bot_routes.py index 6993821..9eac0e3 100644 --- a/routes/openclaw_bot_routes.py +++ b/routes/openclaw_bot_routes.py @@ -2851,7 +2851,14 @@ def send_evening_report(): lines.append(f"{emoji} *vs 昨日* {arrow}`{abs(pct_d):.1f}%` (`NT$ {diff:+,.0f}`)") lines.append("") else: - lines.append("⚠️ *今日業績資料尚未匯入*") + # 檢查是否真的沒有資料,避免重複顯示 + today_str = datetime.now(TAIPEI_TZ).strftime('%Y/%m/%d') + if latest_date() == today_str: + # 如果最新日期就是今天,但查詢失敗,可能是資料庫問題 + lines.append("⚠️ *今日業績資料載入異常*") + else: + # 確實沒有今天的資料 + lines.append("⚠️ *今日業績資料尚未匯入*") lines.append("") top15_ev = query_top_products(td, 15) diff --git a/services/telegram_bot_service.py b/services/telegram_bot_service.py index 6f8fe15..00be136 100644 --- a/services/telegram_bot_service.py +++ b/services/telegram_bot_service.py @@ -1062,6 +1062,7 @@ class TrendTelegramBot: # 註冊處理器 self.application.add_handler(CommandHandler("start", self.cmd_start)) self.application.add_handler(CommandHandler("help", self.cmd_help)) + self.application.add_handler(CommandHandler("menu", self.cmd_start)) # /menu 指令映射到 cmd_start self.application.add_handler(CommandHandler("trend", self.cmd_trend)) self.application.add_handler(CommandHandler("search", self.cmd_search)) self.application.add_handler(CommandHandler("copy", self.cmd_copy))