https://github.com/ahmuq/abot-case
Bot WhatsApp Case Multi Devices With Baileys
https://github.com/ahmuq/abot-case
botwa chatbot chatgpt javascript openai termux whatsapp
Last synced: 3 months ago
JSON representation
Bot WhatsApp Case Multi Devices With Baileys
- Host: GitHub
- URL: https://github.com/ahmuq/abot-case
- Owner: ahmuq
- Created: 2023-03-10T20:39:07.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-06-26T03:09:37.000Z (4 months ago)
- Last Synced: 2025-07-13T03:45:02.219Z (3 months ago)
- Topics: botwa, chatbot, chatgpt, javascript, openai, termux, whatsapp
- Language: JavaScript
- Homepage:
- Size: 32.4 MB
- Stars: 26
- Watchers: 1
- Forks: 22
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🤖 Abot-MD WhatsApp Bot
_A powerful and feature-rich WhatsApp bot built with Node.js_
[](https://visitorbadge.io/status?path=https%3A%2F%2Fgithub.com%2Fahlulmukh%2Fabot-case)
[](https://github.com/ahlulmukh/Abot-MD/network/members)
[](https://github.com/ahlulmukh/Abot-MD/watchers)
[](https://github.com/ahlulmukh/Abot-MD/stargazers)
[](https://github.com/ahlulmukh/Abot-MD/graphs/contributors)
[](https://github.com/ahlulmukh/Abot-MD/issues)
[](https://github.com/ahlulmukh/Abot-MD/issues?q=is%3Aissue+is%3Aclosed)
[](https://github.com/ahlulmukh/Abot-MD/pulls)
[](https://github.com/ahlulmukh/Abot-MD/pulls?q=is%3Apr+is%3Aclosed)---
## 📖 About This Bot
**Abot-MD** is a comprehensive WhatsApp bot built with Node.js and Baileys library. It features a modular case-based system that makes it easy to use, maintain, and extend with additional functionality.
### ✨ Key Features
- 🏗️ **Modular Architecture**: Built with a case-based system for easy development and maintenance
- 🔧 **Highly Configurable**: Easy configuration through setting files
- 🎯 **Multi-Platform Support**: Works on Termux, Ubuntu, Windows, VPS, and RDP
- 🤖 **AI Integration**: Supports OpenAI ChatGPT integration
- 📱 **Rich Media Support**: Handles images, videos, stickers, and documents
- 🛡️ **Security Features**: Anti-link, group management, and user controls
- 💾 **Database Management**: Built-in database for user data, groups, and configurations
- 🎨 **Customizable**: Easy to customize and add new commands---
## 🚀 Installation Guide
### 📱 For Termux/Ubuntu/SSH Users
#### Prerequisites
Make sure you have sufficient storage space and a stable internet connection.
```bash
# Update system packages
apt update && apt upgrade -y# Install required dependencies
apt install git nodejs ffmpeg imagemagick yarn -y# Clone the repository
git clone https://github.com/ahlulmukh/Abot-MD
cd Abot-MD# Install project dependencies
yarn install# Start the bot
yarn start
```### 💻 For Windows/VPS/RDP Users
#### Prerequisites Installation
Download and install the following software:
| Software | Link | Notes |
| --------------- | ------------------------------------------------------- | ------------------------------------------------ |
| **Git** | [Download](https://git-scm.com/downloads) | Version control system |
| **Node.js** | [Download](https://nodejs.org/en/download) | JavaScript runtime (LTS version recommended) |
| **FFmpeg** | [Download](https://ffmpeg.org/download.html) | **Important:** Add to PATH environment variables |
| **ImageMagick** | [Download](https://imagemagick.org/script/download.php) | Image processing library |#### Installation Steps
```bash
# Clone the repository
git clone https://github.com/ahlulmukh/Abot-MD
cd Abot-MD# Install dependencies
npm install# Update packages (optional)
npm update# Start the bot
npm start
```### 🐳 Docker Installation (Alternative)
```bash
# Clone the repository
git clone https://github.com/ahlulmukh/Abot-MD
cd Abot-MD# Build Docker image
docker build -t abot-md .# Run container
docker run -d --name abot-md-container abot-md
```---
## ⚙️ Configuration
### Basic Configuration
1. **Open the configuration file:**
```bash
config/setting.js
```2. **Configure the following settings:**
```javascript
// Bot Owner Configuration
global.owner = ["your_phone_number"]; // Your phone number without +
global.ownerNumber = ["your_number@s.whatsapp.net"];
global.nomerOwner = "your_phone_number";// Bot Information
global.namabotnya = "YourBotName"; // Bot display name
global.namaownernya = "YourName"; // Your name// OpenAI Configuration (for ChatGPT features)
global.keyopenai = "your_openai_api_key_here"; // Get from https://platform.openai.com/// API Keys (Optional)
global.APIKeys = {
"https://tools.betabotz.eu.org/": "your_api_key",
"https://api.ryzendesu.vip/": "your_api_key",
};
```### 🔐 Environment Variables
Create a `.env` file in the root directory:
```env
# Bot Configuration
BOT_NAME=Abot-MD
OWNER_NAME=YourName
OWNER_NUMBER=your_phone_number# API Keys
OPENAI_API_KEY=your_openai_api_key
BETABOTZ_API_KEY=your_betabotz_api_key
RYZENDESU_API_KEY=your_ryzendesu_api_key# Database
DATABASE_URL=your_database_url (if using external database)
```---
## 🏃 Running the Bot
### Standard Run
```bash
# Using Node.js
node main.js# Or using npm
npm start# Or using yarn
yarn start
```### Development Mode
```bash
# With auto-restart on file changes
npm install -g nodemon
nodemon main.js
```### Production Mode
```bash
# Using PM2 for production
npm install -g pm2
pm2 start main.js --name "abot-md"
pm2 save
pm2 startup
```---
## 📚 Project Structure
```
abot-case/
├── 📁 config/ # Configuration files
│ ├── config.json # Bot configuration
│ └── setting.js # Main settings
├── 📁 function/ # Core functionality
│ ├── case.js # Command handlers
│ ├── 📁 database/ # Database files
│ ├── 📁 lib/ # Utility libraries
│ └── 📁 image/ # Bot images and media
├── 📁 session/ # WhatsApp session data
├── 📁 sticker/ # Sticker configuration
├── main.js # Main bot file
├── package.json # Dependencies and scripts
└── README.md # This file
```---
## 🔧 Commands and Features
### General Commands
- `!help` - Display help menu
- `!info` - Bot information
- `!ping` - Check bot response time### Media Commands
- `!sticker` - Convert images/videos to stickers
- `!toimg` - Convert sticker to image
- `!download` - Download media from URLs### Group Management
- `!antilink` - Toggle anti-link protection
- `!welcome` - Set welcome message
- `!kick` - Remove user from group (admin only)### AI Features
- `!ai [question]` - Chat with AI
- `!img [prompt]` - Generate images with AI_Use `!menu` command in WhatsApp to see all available commands_
---
## 🤝 Contributing
We welcome contributions! Here's how you can help:
1. **Fork the repository**
2. **Create a feature branch**
```bash
git checkout -b feature/amazing-feature
```
3. **Commit your changes**
```bash
git commit -m 'Add some amazing feature'
```
4. **Push to the branch**
```bash
git push origin feature/amazing-feature
```
5. **Open a Pull Request**### Development Guidelines
- Follow the existing code style
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation if needed---
## 🐛 Troubleshooting
### Common Issues
#### Bot not responding
- Check internet connection
- Verify WhatsApp session is active
- Check console for error messages#### Installation errors
- Ensure Node.js version is 16 or higher
- Clear npm cache: `npm cache clean --force`
- Delete `node_modules` and reinstall: `rm -rf node_modules && npm install`#### Session expired
- Delete `session` folder
- Restart bot and rescan QR code### Getting Help
- 📧 Email: [ahluldev20@gmail.com](mailto:ahluldev20@gmail.com)
- 💬 Telegram: [@ahlulmukh](https://t.me/ahlulmukh)
- 🐛 Issues: [GitHub Issues](https://github.com/ahlulmukh/Abot-MD/issues)---
## 📄 License
This project is licensed under the **ISC License** - see the [LICENSE](LICENSE) file for details.
---
## 🙏 Acknowledgments
- Thanks to [@WhiskeySockets](https://github.com/WhiskeySockets) for the Baileys library
- Thanks to all contributors who help improve this project
- Special thanks to the open-source community---
## 📱 Connect With Developer
[](https://www.instagram.com/ahlulmukh)
[](https://facebook.com/ahlulmukh)
[](https://t.me/ahlulmukh)
[](https://s.id/1Gqvt)
[](mailto:ahluldev20@gmail.com)
[](https://github.com/ahlulmukh)---
**Made with ❤️ by [Ahlul Mukh](https://github.com/ahlulmukh)**
_If this project helped you, please consider giving it a ⭐_