How godelfin/pmxbot works
pmxbot is a chat bot for IRC and Slack. Messages enter through a platform adapter and reach the bot’s handler/command runtime; commands and phrase handlers produce replies or side effects such as logging, quotes, karma, and image generation. Persisted logs and karma are also reviewed through the web viewer. The graph preserves README capabilities and the indexed command modules; some connections are documented rather than visible in sampled implementation excerpts.
Main entry points: commands.py Command handlers · images.py Image generation · core.py Handler runtime · storage.py Storage backends
Components 18
Bot runtime
- IRC adapter
pmxbot/irc.py - Slack adapter
pmxbot/slack.py - Handler runtime
pmxbot/core.py
Bot capabilities
- Command handlers
pmxbot/commands.py - Phrase responses
pmxbot/phrases.py - Quote libraries
pmxbot/quotes.py - Karma tracking
pmxbot/karma.py - Music library
pmxbot/music.py - Album selection
pmxbot/albums.py - Image generation
pmxbot/images.py - Web utilities
pmxbot/util.py
Persistence
- Storage backends
pmxbot/storage.py - Message logs
pmxbot/logging.py - SQLite or MongoDB
pmxbot/storage.py
Web viewer
- Log and karma viewer
pmxbot/web/viewer.py
Other components
- Chat user
- OpenAI API
- Cloudflare R2
Connections 23
- Chat user → IRC adapter: sends messages
README.rst - Chat user → Slack adapter: sends messages
README.rst - IRC adapter → Handler runtime: dispatches messages
pmxbot/irc.py - Slack adapter → Handler runtime: dispatches messages
pmxbot/slack.py - Handler runtime → Command handlers: registers handlers
pmxbot/commands.py - Command handlers → Quote libraries: runs quote commands
pmxbot/commands.py - Command handlers → Karma tracking: runs karma commands
pmxbot/commands.py - Command handlers → Image generation: starts image requests
pmxbot/commands.py - Command handlers → Web utilities: uses lookup helpers
pmxbot/commands.py - Command handlers → Phrase responses: uses response phrases
pmxbot/commands.py - Handler runtime → Message logs: records messages
pmxbot/core.py - Message logs → Storage backends: selects backend
pmxbot/logging.py - Quote libraries → Storage backends: selects backend
pmxbot/quotes.py - Karma tracking → Storage backends: selects backend
pmxbot/karma.py - Storage backends → SQLite or MongoDB: opens configured store
pmxbot/storage.py - Log and karma viewer → Message logs: reads log history
README.rst - Log and karma viewer → Karma tracking: shows karma
README.rst - Command handlers → Music library: selects music
- Image generation → Music library: creates album covers
pmxbot/images.py - Image generation → Album selection: uses album selection
pmxbot/images.py - Image generation → SQLite or MongoDB: caches image records
README.rst - Image generation → OpenAI API: requests image
README.rst - Image generation → Cloudflare R2: uploads image
README.rst