Plugin-Based
Every feature is a plugin. Add or remove modules without touching the core. Just drop a folder with register.json.
A plugin-based, event-driven Discord bot framework for Python with thin-core architecture and zero restrictions.
Every feature is a plugin. Add or remove modules without touching the core. Just drop a folder with register.json.
Control load order with priority in register.json. Lower number = loads first.
Built-in EventBus for loose coupling between modules. Modules don't know each other.
Dependency Injection container for sharing services. services.get() anywhere.
~1500 lines of core code. Everything else is a plugin. Minimal and stable.
Configure via config/framework.json and config/exports.json.
Reload modules at runtime without restarting the bot. Perfect for development.
Production-ready spam detection with warning levels, decay timers, mute role.
Modules can do ANYTHING. No hand-holding, no artificial limits.
┌─────────────────────────────────────────────────────────────┐
│ Titan Framework │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Core (Thin Core - ~1500 lines) │
│ │
│ • EventBus - Loose coupling │
│ • ServiceContainer - Dependency Injection │
│ • PriorityRegistry - Module discovery & loading │
│ • Hub - Central coordinator │
│ │
│ from core import * ← Single entry point │
└─────────────────────────────────────────────────────────────┘
│
┌─────────────────────┼─────────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ config/ │ │ modules/ │ │ plugins/ │
│ (JSON Config)│ │ (Plugins) │ │ (Extensions) │
└───────────────┘ └───────────────┘ └───────────────┘
# Clone the repository git clone https://github.com/Ratin568/titan-framework.git cd titan-framework # Install dependencies pip install -r requirements.txt # Configure environment cp .env.example .env # Edit .env with your Discord bot token # Run the bot python main.py
titan-framework/ ├── core/ # Thin Core │ ├── events/ # EventBus │ ├── container/ # ServiceContainer │ └── registry/ # PriorityRegistry ├── config/ # JSON Configuration │ ├── framework.json │ └── exports.json ├── modules/ # Plugins │ ├── antispam/ │ └── hello_world/ ├── main.py └── README.md
| Module | Priority | Type | Description |
|---|---|---|---|
antispam |
10 | Complex | Spam detection with warning levels, decay timers, mute role |
hello_world |
100 | Simple | Minimal example with /hello command |
# Step 1: Create folder modules/my_module/ ├── register.json └── main.py # Step 2: register.json { "name": "my_module", "priority": 50, "enabled": true, "files": ["main.py"] } # Step 3: main.py from core import * async def setup_module(bot, event_bus, services): @bot.tree.command(name="hello") async def hello(interaction): await interaction.response.send_message("Hello!")
{
"bot": {
"prefix": "!",
"guild_id": 1122769174045917265,
"activity": {
"name": "Titan System",
"type": "watching"
}
},
"modules": {
"search_paths": ["modules", "plugins"]
}
}
{
"core": [
"TitanHub",
"EventBus",
"ServiceContainer"
],
"modules": {
"antispam": [
"is_spamming",
"get_user_info"
]
},
"custom": []
}
| Problem | Solution |
|---|---|
| Module not loading | Check register.json exists and enabled is true |
| Slash commands not showing | Wait 1-2 minutes. Check guild_id in config |
| Import errors | Use from core import * instead of direct imports |
| Service not found | Register service with services.register() first |