Skip to content

ahmuq/abot-case

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Abot-MD WhatsApp Bot

A powerful and feature-rich WhatsApp bot built with Node.js

Visitors Forks Watchers Stars Contributors Issues Closed Issues Pull Requests Closed PRs


πŸ“– 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.

# 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 Version control system
Node.js Download JavaScript runtime (LTS version recommended)
FFmpeg Download Important: Add to PATH environment variables
ImageMagick Download Image processing library

Installation Steps

# 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)

# 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:

    config/setting.js
  2. Configure the following settings:

// Bot Owner Configuration
global.owner = ["your_phone_number"]; // Your phone number without +
global.ownerNumber = ["[email protected]"];
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:

# 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

# Using Node.js
node main.js

# Or using npm
npm start

# Or using yarn
yarn start

Development Mode

# With auto-restart on file changes
npm install -g nodemon
nodemon main.js

Production Mode

# 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
    git checkout -b feature/amazing-feature
  3. Commit your changes
    git commit -m 'Add some amazing feature'
  4. Push to the branch
    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


πŸ“„ License

This project is licensed under the ISC License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Thanks to @WhiskeySockets for the Baileys library
  • Thanks to all contributors who help improve this project
  • Special thanks to the open-source community

πŸ“± Connect With Developer

Instagram Facebook Telegram WhatsApp Email GitHub


Made with ❀️ by Ahlul Mukh

If this project helped you, please consider giving it a ⭐

About

Bot WhatsApp Case Multi Devices With Baileys

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •