How adaamn/twelvecorp works
TwelveCorp is a Discord bot whose main user workflow is /ask: a Discord interaction reaches the AI cog, which requests an answer from the service layer and returns it as an embed; the service can use web search for current information. Other user-facing branches provide mention-based chat, profile analysis, role-play, reaction-triggered translation and latency reporting. The services module centralizes model calls, while configuration supplies credentials and prompts. The README is empty; relationships below are based on the shown source, and optional web search is marked separately.
Main entry points: bot.py Bot startup · services.py AI service layer · chat.py Mention chat · profile.py Profile analysis
Components 13
Discord runtime
- Discord platform
- Bot startup
src/bot.py - Bot configuration
src/config.py
Bot features
- Ask command
src/features/ai.py - Mention chat
src/features/chat.py - Profile analysis
src/features/profile.py - Role-play
src/features/larp.py - Reaction translation
src/features/translate.py - Latency command
src/features/ping.py
AI services
- AI service layer
src/services.py
External services
- Anthropic API
- Tavily search
Other components
- Discord user
Connections 26
- Discord user → Discord platform: uses
- Discord platform → Bot startup: starts bot
src/bot.py - Bot startup → Ask command: loads extension
src/bot.py - Bot startup → Mention chat: loads extension
src/bot.py - Bot startup → Profile analysis: loads extension
src/bot.py - Bot startup → Role-play: loads extension
src/bot.py - Bot startup → Reaction translation: loads extension
src/bot.py - Bot startup → Latency command: loads extension
src/bot.py - Ask command → AI service layer: requests answer
src/features/ai.py - Mention chat → AI service layer: requests reply
src/features/chat.py - Profile analysis → AI service layer: requests analysis
src/features/profile.py - Role-play → AI service layer: requests role-play
src/features/larp.py - Reaction translation → AI service layer: requests translation
src/features/translate.py - AI service layer → Bot configuration: reads settings
src/services.py - Bot startup → Bot configuration: reads token
src/bot.py - AI service layer → Anthropic API: calls model
src/services.py - AI service layer → Tavily search: searches web
src/services.py - Ask command → Discord platform: sends answer
src/features/ai.py - Mention chat → Discord platform: reads history
src/features/chat.py - Mention chat → Discord platform: replies
src/features/chat.py - Profile analysis → Discord platform: reads history
src/features/profile.py - Profile analysis → Discord platform: sends analysis
src/features/profile.py - Role-play → Discord platform: sends response
src/features/larp.py - Reaction translation → Discord platform: fetches message
src/features/translate.py - Reaction translation → Discord platform: replies with embed
src/features/translate.py - Latency command → Discord platform: reports latency
src/features/ping.py