How ashyboxy/bread-framework works
Main Components
A. Core Framework Layer:
• Client Class (Entry point)
• Event Handler System
• Command Handler System
• Database Interface (BreadDB)
B. Command Management Layer:
• Base Command Classes
• Guild Commands
• General Commands
C. Event Management Layer:
• Discord Events Handling
• Custom Event Processing
D. Utility Layer:
• Logger System
• Discord Utils
• Internationalization System
┌─ External Layer ─────────────────────┐
• Discord.js API │
• ┬─────────────────────┘
• ↓
┌─ Core Layer ──────────────────────────────────────┐
• ┌─────────────┐ ┌──────────────┐ ┌─────────────┐ │
• Client Class │→│Event Handler │→│Command Hand.│ │
• ┘ └──────────────┘ └─────────────┘ │
• ┬──────────────────────────┘
• ↓
┌─ Feature Layer ───────────────────────────────────┐
• ┌─────────────┐ ┌──────────────┐ ┌─────────────┐ │
• Commands │ │Events │ │Database │ │
• ┘ └──────────────┘ └─────────────┘ │
• ┬──────────────────────────┘
• ↓
┌─ Support Layer ───────────────────────────────────┐
• ┌─────────────┐ ┌──────────────┐ ┌─────────────┐ │
• Utils │ │Localization │ │Logger │ │
• ┘ └──────────────┘ └─────────────┘ │
• ┘
Important Relationships
• Command flow from interaction events to command execution
• Database interactions with commands
• Localization string loading paths
• Logger integration points
Implementation Details
• ESM Loader configuration
• Command registration flow
• Event handling pipeline
• Database interaction patterns
• Guild-specific command handling