From c8c9920dd042917104c66f46ad5bc9fb669f6be0 Mon Sep 17 00:00:00 2001 From: CD Date: Sat, 7 Mar 2026 14:59:15 +0900 Subject: [PATCH] feat: auto-create Discord channel when new project registration detected --- bot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bot.py b/bot.py index f338ad1..f911f3a 100644 --- a/bot.py +++ b/bot.py @@ -355,6 +355,12 @@ class GravityBot(commands.Bot): # Reload conv→project registrations each cycle self._load_registrations() + # Ensure channels exist for all registered projects + for project in set(self.conv_to_project.values()): + if project not in self.project_channels: + await self._get_channel(project) + logger.info(f"Auto-created channel for registered project: {project}") + requests = self.bridge.get_pending_requests() for req in requests: if req.request_id in self._sent_approval_ids: