How idkhowtocodefr/code-bot works
CodeBot is a Discord coding-assistant bot. Users invoke slash commands for public or private help, debugging, learning resources, tips, and command help; the bot calls response logic, sends results back through Discord, and stores or retrieves per-user history for personalized answers. Source confirms these calls and the SQLite/Cohere integrations. README also documents response chunking and DM privacy handling; implementation details beyond the sampled source are not inferred.
Main entry points: codebot.py Command handlers · response.py Code help · db.py User history
Components 13
Discord Commands
- Command handlers
codebot.py - Response delivery
codebot.py - Help menu
response.py - Strictness control
response.py
Assistant Services
- Code help
response.py - Code debugging
response.py - Learning resources
response.py - Coding tips
response.py
History Storage
- History access
response.py - User history
db.py
Other components
- Discord user
- Discord API
- Cohere AI
Connections 20
- Discord user → Discord API: invokes commands
- Discord API → Command handlers: dispatches interactions
- Command handlers → Code help: calls help
- Command handlers → Code debugging: calls debug
- Command handlers → Learning resources: calls resources
- Command handlers → Coding tips: calls tips
- Command handlers → Help menu: requests help
- Command handlers → Strictness control: sets strictness
- Code help → History access: builds prompt
- Code debugging → History access: builds prompt
- History access → User history: reads history
- Command handlers → User history: stores exchanges
- Command handlers → User history: initializes store
- Code help → Cohere AI: requests answer
- Code debugging → Cohere AI: requests review
- Learning resources → Cohere AI: requests links
- Coding tips → Cohere AI: requests tips
- Command handlers → Response delivery: passes results
- Response delivery → Discord API: sends messages
- Discord API → Discord user: delivers replies