feat: auto-create Discord channel when new project registration detected
This commit is contained in:
6
bot.py
6
bot.py
@@ -355,6 +355,12 @@ class GravityBot(commands.Bot):
|
|||||||
# Reload conv→project registrations each cycle
|
# Reload conv→project registrations each cycle
|
||||||
self._load_registrations()
|
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()
|
requests = self.bridge.get_pending_requests()
|
||||||
for req in requests:
|
for req in requests:
|
||||||
if req.request_id in self._sent_approval_ids:
|
if req.request_id in self._sent_approval_ids:
|
||||||
|
|||||||
Reference in New Issue
Block a user