1.0 KiB
1.0 KiB
| id | type | title | tags | importance | confidence | created | updated | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 8bd768ce-365c-4e25-b93a-ff4d67554141 | solution | Discord bot dynamic configuration with live reload |
|
0.7 | 0.8 | 2026-02-13T20:35:08.512896+00:00 | 2026-02-13T20:35:08.512896+00:00 |
Implemented /add-project command for Claude Discord Coordinator that adds projects without restarting bot.
Key pattern:
- Config.add_project() adds to in-memory config
- Config.save() writes atomically (temp file + os.replace)
- No bot restart needed - config reloaded live
Files:
- config.py: add_project() and save() methods
- commands.py: /add-project slash command with git clone + validation
- Rollback on failure: delete cloned dir, don't save config
Git auth: credential.helper=store with ~/.git-credentials for automated cloning
Benefits:
- Self-service project setup via Discord
- No manual config editing
- No service restarts
- Atomic config updates prevent corruption