Skip to content
znanxPublic

About

Simple WhatsApp Bot use Baileys

Topics

Resources

Security policy

Stars

105 stars

Watchers

6 watching

Forks

Repository files navigation

MOON BOT

Unofficial WhatsApp bot with modular plugins, built on top of Baileys and @znan/wabot.

Forks Stars License Issues

Documentation

Highlights

  • 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.

Requirements

  • Node.js >= 22.23.4
  • FFmpeg
  • ImageMagick
  • WebP tools
  • WhatsApp account number
  • API key for Alya API (required by API-based features)

Quick Start

git clone https://github.com/znanx/moon-bot.git
cd moon-bot
npm install --ignore-scripts

Create .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:

  • owner and owner_name
  • pairing.number (your WhatsApp number)
  • pairing.state (true to use pairing mode)
  • pairing.version: Example WhatsApp client version array (e.g. [2, 3000, 1041168064]). See wppconnect WhatsApp versions for compatible values.

Run the bot:

npm start

Run Modes

  • npm start: run main bot process (auto restart handled by index.js).
  • npm run server: run bot with HTTP status endpoint from server.js.
  • npm run pm2: start with PM2 (or use pm2.config.js).

Core Structure

  • 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.

Security

Please read SECURITY.md before deploying to production.

Notes

  • This project is still actively developed.
  • This is an unofficial WhatsApp automation project; use it responsibly and at your own risk.
  • If you hit an error, report it quickly and include the relevant logs, reproduction steps, and expected vs actual behavior.
  • If you find the root cause and have a fix, open a pull request directly without waiting for permission.
  • Prefer small, focused fixes and clear commit messages so the issue can be reviewed and merged quickly.

About

Simple WhatsApp Bot use Baileys

Topics

Resources

Security policy

Stars

105 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages