fix: only log registration count when it changes (stop 3s spam)

This commit is contained in:
2026-03-07 14:53:44 +09:00
parent 35ee916440
commit d227ba57f7

8
bot.py
View File

@@ -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 ──────────────────────────────────────────