WhatsApp Bot using baileys
This is a simple and powerful WhatsApp bot built using the Baileys library, an unofficial WhatsApp Web API for Node.js. It allows you to automate replies, handle user messages, and create intelligent bot logic.
Published on: 21/07/2025π Project Overview
β οΈ Disclaimer: This bot uses an unofficial API. It may violate WhatsAppβs Terms of Service and is not recommended for production or commercial use. Use at your own risk.
β¨ Features
- π± Connects to WhatsApp Web using QR Code
- β¨ Automatically replies to messages (customizable)
- π§ Simple logic engine (keyword-based)
- π€ Send text, images, media
- π Auto reconnect on disconnect
π¦ Requirements
- Node.js v16 or later
- WhatsApp account (not banned)
- Terminal/Command prompt
π₯ Installation
1. Clone the repository
git clone https://github.com/nexoscreator/whatsapp-bot-baileys.git
cd whatsapp-bot-baileys2. Install dependencies
npm install3. Start the bot
node index.js4. Scan the QR code
Open WhatsApp on your phone β Menu β Linked Devices β Scan QR code from terminal.
π¬ Bot Logic
Right now, the bot handles the following:
If the user sends
"hi"or"Hi", it replies with:Hello! π I am your bot.
You can modify and extend this behavior in index.js.
πΈ Media Support (Example)
await sock.sendMessage(from, {
image: { url: 'https://example.com/image.jpg' },
caption: 'Here is your image!'
});π§ Want to Add NLP?
You can integrate with:
- OpenAI ChatGPT API
- Dialogflow
- Rasa
βοΈ Deployment
You can deploy your bot on platforms like:
β οΈ Disclaimer
This bot uses an unofficial WhatsApp API via Web scraping (like WhatsApp Web). Your number may be banned if used incorrectly. Do NOT use this bot for:
- Bulk messaging
- Spamming
- Commercial purposes
π€ Contributing
We β€οΈ contributions! Follow these steps to contribute:
- π΄ Fork the repository
- πΏ Create a new branch (
git checkout -b feature/AmazingFeature) - πΎ Commit your changes (
git commit -m 'Add some AmazingFeature') - π Push to the branch (
git push origin feature/AmazingFeature) - π Open a Pull Request
π See our Contribution Guidelines for more details.
π License
This project is licensed under the MIT License. See the LICENSE file for details.
π¬ Contact & Community
π¬ Join us on Discord: Click Here
π¦ Follow on Twitter: @nexoscreator
π§ Email: contact@nexoscreator.tech
If you find this project helpful, please consider starring β the repository or sponsoring π on GitHub!
Created with β€οΈ by @nexoscreator