How lyfe00011/whatsapp-bot works
WhatsApp User Bot links a user’s WhatsApp account, loads command plugins, and responds to incoming chats with group administration, media processing, downloads, and utility features. The sampled bot.js shows connection, plugin loading, scheduling, and chat-update handling; the message-dispatch implementation and several referenced utility modules are absent from the supplied tree, so their internal wiring is not expanded. README-listed capabilities are represented by their plugin modules, but their individual implementations were not sampled.
Main entry points: bot.js Connection and events · greetings.js Greetings and protection · scrapers.js Search and downloads · plugins Command plugins
Components 19
Bot runtime
- Connection and events
bot.js - Command plugins
plugins - Localized strings
language.js
Group features
- Group administration
plugins/admin.js - Greetings and protection
plugins/greetings.js - Group mute
plugins/groupmute.js
Media and content
- Media transforms
plugins/media.js - Documents and image effects
plugins/docx.js - Search and downloads
plugins/scrapers.js - Social downloads
plugins - Other utilities
plugins
Configuration and state
- Configuration and database
config.js - Session records
bot.js - Plugin records
plugins/sql/plugin.js - Greeting records
plugins/sql/greetings.js - Filter records
plugins/sql/filters.js
Other components
- WhatsApp user
- External web services
Connections 18
- WhatsApp user → WhatsApp: sends chats
- WhatsApp → Connection and events: delivers chat events
- Connection and events → WhatsApp: connects and replies
- Connection and events → Command plugins: loads plugins
- Connection and events → Session records: reads and writes
- Connection and events → Plugin records: loads plugin records
- Connection and events → Configuration and database: syncs database
- Group administration → WhatsApp: manages groups
- Greetings and protection → Greeting records: configures greetings
- Greetings and protection → Filter records: configures filters
- Group mute → WhatsApp: mutes groups
- Media transforms → WhatsApp: downloads and replies
- Documents and image effects → WhatsApp: processes and replies
- Search and downloads → External web services: searches and fetches
- Social downloads → External web services: fetches media
- Search and downloads → WhatsApp: sends results
- Other utilities → WhatsApp: handles commands
- Command plugins → Localized strings: gets strings