Unofficial WhatsApp bot with modular plugins, built on top of Baileys and @znan/wabot.
- Bahasa Indonesia:
docs/ID.md - English:
docs/EN.md
- Plugin-first architecture.
- Supports command plugins and event plugins.
- Built-in anti-spam, anti-link, anti-delete, anti-call, and other moderation tools.
- Auto database save and optional scheduled owner backup.
- Optional HTTP health server (
npm run server) for hosting environments.
- Node.js
>= 22.x - FFmpeg
- ImageMagick
- WebP tools
- WhatsApp account number
- API key for Alya API (required by API-based features)
git clone https://github.com/znanx/moon-bot.git
cd moon-bot
npm installCreate .env in the project root:
API_ENDPOINT='https://api.alyachan.dev/api'
API_KEY='your_api_key'
DATABASE_URL=''
TZ='Asia/Jakarta'Update config.json:
ownerandowner_namepairing.number(your WhatsApp number)pairing.state(trueto use pairing mode)
Run the bot:
npm startnpm start: run main bot process (auto restart handled byindex.js).npm run server: run bot with HTTP status endpoint fromserver.js.npm run pm2: start with PM2 (or usepm2.config.js).
index.js: process bootstrap and auto-restart supervisor.main.js: WhatsApp connection, DB init, periodic jobs, listener setup.handler.js: command/event routing and permission checks.plugins/: bot features grouped by categories.lib/system/: internal helpers, schema, listeners, anti-spam, and models.
Please read SECURITY.md before deploying to production.
- This project is still actively developed.
- This is an unofficial WhatsApp automation project; use it responsibly and at your own risk.