Personal WhatsApp bot based on whatsapp-web.js.
Made for personal use with simple commands like connection testing, sending funny pictures, and more.
This bot uses a dynamic command prefix based on environment:
- Development mode →
$ - Production mode →
!
Prefix is configured automatically from:
commandPrefix: isDev ? "$" : "!"
!menu
!ai hello
$menu
$ai hello
Replace
<prefix>with the active command prefix.
<prefix>testprivate— Tes koneksi bot<prefix>kucink— Kirim pesan cukurukuk<prefix>neko— Kirim gambar neko random<prefix>menu— Tampilkan daftar perintah<prefix>ai <teks>— Tanya AI<prefix>price <symbol>— Cek harga cryptoMore features (coming soon)
Make sure your system has installed:
- Node.js (version 16.x or later is recommended)
- WhatsApp is active and can scan QR code
git clone https://github.com/bagoesrex/wa-personal-bot.git
cd wa-personal-botnpm installCopy .env.example to .env, then adjust the values as needed:
cp .env.example .envexample .env:
# App Environment
NODE_ENV=development
APP_NAME="bagoesrex personal bot"
# Whatsapp Environments
WA_DEVICE_NAME=meguphone
WA_SESSION_PATH=./session
# Gemini Environments
GEMINI_API_KEY=your_gemini_api_key
GEMINI_MODEL=gemini-2.5-flash
# Coinmarketcap Environments
COINMARKETCAP_API_KEY=your_coinmarketcap_api_keynpm run startOn the first run, a QR code will appear in the terminal. Scan it using WhatsApp:
WhatsApp → Linked Devices → Link a Device
- Make sure you have logged in to WhatsApp on your browser beforehand.
- Can be run on VPS, use
screen,tmux, orpm2to keep the bot running after logout.