From d227ba57f7686876ff7e9e817bd6724e45ac2074 Mon Sep 17 00:00:00 2001 From: CD Date: Sat, 7 Mar 2026 14:53:44 +0900 Subject: [PATCH] fix: only log registration count when it changes (stop 3s spam) --- bot.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 175b054..f338ad1 100644 --- a/bot.py +++ b/bot.py @@ -168,8 +168,12 @@ class GravityBot(commands.Bot): except (json.JSONDecodeError, OSError): pass - if count: - logger.info(f"Loaded {count} conversation→project registrations") + # Only log when count changes + prev = getattr(self, '_last_reg_count', -1) + if count != prev: + self._last_reg_count = count + if count: + logger.info(f"Loaded {count} conversation→project registrations") # ─── Channel Management ──────────────────────────────────────────