MEDIUM: Split api.py Into Route Modules #24
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
bot/api.py is too large and handles multiple concerns, making it difficult to maintain and test.
Where It Occurs
Why This Is a Problem
What Can Go Wrong
Scenario 1: Merge Conflict
Scenario 2: Bug in One Area Affects All
Proposed Fix
Split api.py into route modules:
Example migration:
Severity
MEDIUM - Large files are hard to maintain and cause merge conflicts.
Files Affected
bot/api.py (refactor), new files: bot/routes/init.py, bot/routes/config.py, bot/routes/mood.py, bot/routes/server.py, bot/routes/logs.py