How zaxerion/kinda-wabot works
kinda-wabot is a Node.js WhatsApp bot with Toram game-information and general chat/group utilities. Its principal workflow is: WhatsApp delivers a message through the Baileys connection, the handler normalizes and dispatches it to loaded plugins, and the selected command responds through the connection. Startup also loads persistent data and Toram data; the README documents pairing and dev modes. The excerpts establish the main dispatch and storage wiring, but not the internals of most plugin commands, so those are grouped by domain rather than given speculative call chains.
Main entry points: connection.js WhatsApp connection · database.js Application database · main.js Startup · handler.js Message handler
Components 20
Bot runtime
- Startup
main.js - WhatsApp connection
lib/connection.js - Message handler
handler.js - Plugin loader
lib/plugins.js
Bot capabilities
- Chat and group commands
plugins - Toram guides
plugins/toram/guide.js - Toram buffs
plugins/toram/shortbuff.js - Toram commands
plugins/toram - Command menu
plugins/menu/main.js
Persistence
- Application database
lib/database.js - MongoDB adapter
lib/DB_Adapters/mongoDB.js - Cloud DB adapter
lib/DB_Adapters/cloudDBAdapter.js
Shared services
- Message serialization
lib/simple.js - Toram data refresh
lib/toramfetch.js - Media conversion
lib/converter.js - Sticker processing
lib/sticker.js - Image upload
lib/uploadImage.js - Runtime utilities
lib/func.js
Other components
- WhatsApp user
Connections 23
- WhatsApp user → WhatsApp: sends messages
- WhatsApp → WhatsApp connection: delivers events
- WhatsApp connection → Message handler: loads handler
lib/connection.js - Message handler → Plugin loader: reads plugins
handler.js - Plugin loader → Chat and group commands: loads modules
lib/plugins.js - Message handler → Application database: loads state
handler.js - Message handler → WhatsApp connection: uses connection
handler.js - WhatsApp connection → WhatsApp: connects via Baileys
lib/connection.js - Startup → WhatsApp connection: starts connection
main.js - Startup → Plugin loader: loads plugins
main.js - Startup → Application database: writes state
main.js - Startup → Toram data refresh: refreshes data
main.js - Application database → MongoDB adapter: selects adapter
lib/database.js - Application database → Cloud DB adapter: selects adapter
lib/database.js - Command menu → Plugin loader: lists commands
plugins/menu/main.js - Command menu → Application database: reads state
plugins/menu/main.js - Message serialization → Media conversion: converts audio
lib/simple.js - Chat and group commands → Runtime utilities: uses utilities
plugins/menu/main.js - Chat and group commands → Sticker processing: uses sticker tools
plugins/sticker/sticker.js - Sticker processing → Media conversion: uses conversion
lib/sticker.js - Chat and group commands → Image upload: uploads media
plugins/tools/tomp4.js - Toram commands → Toram guides: provides guide
plugins/toram/guide.js - Toram commands → Toram buffs: provides buffs
plugins/toram/shortbuff.js