How shifosan/silk-discord-bot works
SILK is a Discord community bot with AI chat and lookup, moderation and server utilities, XP/level progression, logging, and a web dashboard. The main user workflow is a Discord message or command reaching a bot cog, which may consult an AI service or persisted guild/user state before responding through Discord. Leveling is a distinct progression stage: events update XP, core logic evaluates levels and rewards, and database helpers persist or rank users. Dashboard.js and dashboard.py indicate a separate browser-to-API configuration workflow. The README is only a title; unsampled cog and dashboard internals limit confidence in their wiring.
Main entry points: main.py Bot and extension loader · aotr_gpt.py AoTR lookup · chat.py AI chat · core.py XP event handling
Components 21
Bot Runtime
- Bot and extension loader
main.py
AI Features
- AI chat
cogs/chat.py - DM chat
cogs/dm_chat.py - AoTR lookup
cogs/aotr_gpt.py - Creative tools
cogs/creative.py
Community Operations
- Moderation
cogs/moderation.py - Server event logs
cogs/logger.py - Log formatting
cogs/logs/channels.py - Prefix configuration
cogs/prefix_handler.py - Starboard
cogs/starboard.py
Level Progression
- XP event handling
cogs/level_system/core.py - Level commands
cogs/level_system/commands.py - Level configuration
cogs/level_system/bot_config/main_menu.py - Level data access
cogs/level_system/database.py
Web Dashboard
- Dashboard interface
static/js/dashboard.js - Dashboard API
dashboard.py
Other components
- Discord member
- Discord platform
- Gemini API
- MongoDB
- Dashboard user
Connections 33
- Bot and extension loader → AI chat: loads extension
- Bot and extension loader → DM chat: loads extension
- Bot and extension loader → AoTR lookup: loads extension
- Bot and extension loader → Creative tools: loads extension
- Bot and extension loader → Moderation: loads extension
- Bot and extension loader → Server event logs: loads extension
- Bot and extension loader → Prefix configuration: loads extension
- Bot and extension loader → Starboard: loads extension
- Bot and extension loader → XP event handling: loads extension
- Bot and extension loader → Level commands: loads extension
- Bot and extension loader → Level configuration: loads extension
- Discord member → Discord platform: sends message
- Discord platform → AI chat: delivers events
- Discord platform → DM chat: delivers DM
- Discord platform → AoTR lookup: delivers query
- Discord platform → Moderation: delivers commands
- Discord platform → XP event handling: delivers events
- Discord platform → Level commands: delivers commands
- Discord platform → Level configuration: delivers interactions
- AI chat → Gemini API: generates replies
- AoTR lookup → Gemini API: embeds and generates
- AoTR lookup → MongoDB: vector searches
- Prefix configuration → MongoDB: reads and writes config
- XP event handling → Level data access: reads and updates XP
- Level commands → Level data access: reads rankings
- Level configuration → Level data access: reads configuration
- Server event logs → Log formatting: formats events
- Dashboard user → Dashboard interface: uses dashboard
- Dashboard interface → Dashboard API: calls API
- Dashboard API → MongoDB: reads and writes
- AI chat → Discord platform: sends replies
- AoTR lookup → Discord platform: sends answers
- XP event handling → Discord platform: announces level-ups