How sexlovr/discord-bot-fleet works
Discord Bot Fleet is a web control panel for configuring and operating multiple AI-powered Discord bots. The main workflow is panel/API requests to create or edit a bot, persist its configuration, start an isolated bot process, then handle Discord messages through an LLM and enabled tools. The graph also preserves live logs, channel discovery, encryption, and the separate Python REST-polling runtime represented in the source index. Relationships are limited to excerpted calls, source-index references, or README statements; unsampled details are not assumed.
Main entry points: server.ts HTTP and WS API · bot.ts Node bot runtime · bot.py Python REST bot · manager.ts Bot manager
Components 23
Panel and API
- Web panel
web/static/app.js - HTTP and WS API
src/server.ts - Channel discovery
src/discord_helpers.ts
Fleet Operations
- Bot manager
src/manager.ts - Log streaming
src/logger.ts
Bot Runtime
- Node bot runtime
src/bot.ts - LLM client
src/llm.ts - Bot configuration
src/types.ts - Python REST bot
bot-python/bot.py - Discord REST client
bot-python/discord_rest.py - Python LLM client
bot-python/llm.py
Tools and Integrations
- Tool registry
src/tools/index.ts - Web search
src/tools/web_search.ts - Other bot tools
src/tools - Python tool registry
bot-python/tools/__init__.py
Persistence and Security
- Bot config store
src/store.ts - Token encryption
src/crypto.ts - Persistent logs
src/logger.ts - Python decryption
bot-python/crypto.py - Per-bot memory
src/tools/memory.ts
Other components
- Panel user
- Discord API
- LLM proxy
Connections 26
- Panel user → Web panel: manages bots
README.md - Web panel → HTTP and WS API: calls API
- HTTP and WS API → Bot config store: reads and writes
src/server.ts - HTTP and WS API → Bot manager: controls lifecycle
src/server.ts - HTTP and WS API → Channel discovery: validates tokens
src/server.ts - HTTP and WS API → LLM client: tests proxy
src/server.ts - HTTP and WS API → Token encryption: encrypts tokens
src/server.ts - HTTP and WS API → Log streaming: serves live logs
README.md - Channel discovery → Discord API: fetches channels
README.md - Bot manager → Bot config store: loads config
src/manager.ts - Bot manager → Node bot runtime: spawns process
src/manager.ts - Bot manager → Log streaming: pipes output
src/manager.ts - Node bot runtime → Bot config store: loads bot config
src/bot.ts - Node bot runtime → LLM client: requests responses
src/bot.ts - Node bot runtime → Tool registry: dispatches tools
src/bot.ts - Node bot runtime → Discord API: handles messages
- LLM client → LLM proxy: sends chat requests
src/llm.ts - LLM client → Token encryption: decrypts API key
src/llm.ts - Tool registry → Web search: dispatches search
src/tools/index.ts - Tool registry → Other bot tools: dispatches tools
src/tools/index.ts - Other bot tools → Per-bot memory: reads and writes
README.md - Python REST bot → Python LLM client: requests responses
bot-python/bot.py - Python REST bot → Python tool registry: dispatches tools
bot-python/bot.py - Python REST bot → Discord REST client: polls and replies
bot-python/bot.py - Python LLM client → Python decryption: decrypts API key
bot-python/llm.py - Python REST bot → Bot config store: loads bot config
bot-python/bot.py