How iamdestroy/yukibot-md works
Yuki Bot is a Baileys-based, multifuncional WhatsApp bot. Its main workflow receives a WhatsApp event, normalizes the message, processes it in the command handler, and replies through the socket. Commands span group administration, gacha and economy games, media downloads, stickers, profiles, and utility features; the README also describes automatic responses and external API integrations. The excerpts show startup, message handling, selected database access, and sticker conversion. Most command-family links are therefore shown as unverified rather than inferred from directory names.
Main entry points: main.js Message handler · database.js SQLite database · index.js Socket startup · serialize.js Message normalization
Components 20
Bot runtime
- Socket startup
index.js - Message normalization
core/serialize.js - Message handler
main.js - Command loader
core/system/cmdsLoader.js - Command registry
core/system/commands.js
Command features
- Gacha games
cmds/gacha - Economy games
cmds/economy - Group management
cmds/group - Media commands
cmds/downloads - Sticker commands
cmds/stickers/sticker.js - Profiles and levels
cmds/profile - Automatic responses
cmds/events.js - Other commands
cmds/utils
State and media
- SQLite database
core/system/database.js - Sticker metadata
core/exif.js
External services
- Configured APIs
settings.js
Other components
- WhatsApp user
- External API services
- Baileys
Connections 23
- WhatsApp user → WhatsApp: sends messages
README.md - WhatsApp → Socket startup: delivers events
- Socket startup → Message normalization: normalizes messages
index.js - Message normalization → Message handler: passes message
- Socket startup → Command loader: loads commands
index.js - Message handler → Command registry: looks up command
- Message handler → Gacha games: dispatches commands
- Message handler → Economy games: dispatches commands
- Message handler → Group management: dispatches commands
- Message handler → Media commands: dispatches commands
- Message handler → Sticker commands: dispatches commands
- Message handler → Profiles and levels: dispatches commands
- Message handler → Automatic responses: handles events
- Message handler → Other commands: dispatches commands
- Message handler → SQLite database: updates chat stats
main.js - Economy games → SQLite database: reads and writes
cmds/economy/shop.js - Sticker commands → Sticker metadata: writes metadata
cmds/stickers/sticker.js - Gacha games → SQLite database: uses stored state
- Profiles and levels → SQLite database: uses stored state
- Automatic responses → SQLite database: uses stored state
- Configured APIs → External API services: configures integrations
- Media commands → External API services: fetches media
- WhatsApp → Baileys: connects through