How iamdhakrey/sakura works
Main Components
A. Discord Interface Layer
• Discord API Integration
• Bot Event Handlers (from sakura/bot/events/)
• Command Handlers (Traditional, Slash commands)
B. Web Application Layer
• Django Web Server
• Authentication System (sakuralogin)
• Web Dashboard
• API Endpoints
C. Core Bot Services
• Command Modules
• Utility Services
• Database Interface
• Client Layer |
• (Discord + Web Browser)|
• ↕
• Interface Layer |
• (Discord API + Django) |
• ↕
• Application Core |
• (Bot + Web Services) |
• ↕
• Data Layer |
• (Database + Storage) |
Component Details
A. Client Layer:
• Discord Client
• Web Browser Interface
• Bidirectional communication
B. Interface Layer:
• Discord.py Integration
• Django Web Server (main/*)
• Authentication (sakuralogin/)
• REST API endpoints
C. Application Core:
• Command Modules:
• Basic Commands (bot/cmd/basic.py)
• Moderation (bot/cmd/moderation.py)
• Music (bot/cmd/music.py)
• Self Roles (bot/cmd/self_role.py)
• Bot Services:
• Event Handlers (bot/events/*)
• Utility Functions (BotMics/*)
• Web Services:
• Dashboard
• Server Management
• Configuration Interface
D. Data Layer:
• Database Models (models.py)
• File Storage (for images, etc.)
• Configuration Storage (settings.ini)
Important Relationships
• Discord API ↔ Bot Event Handlers
• Web Routes ↔ Views
• Authentication Flow
• Database Interactions
• Command Processing Pipeline
• Event Handling Flow
Technical Details
• Django framework components
• Discord.py integration points
• Database connections
• Static file handling
• API endpoints
• Command registration system
• Event handling system