Skip to content

Latest commit

 

History

History
284 lines (195 loc) · 5 KB

File metadata and controls

284 lines (195 loc) · 5 KB

🚀 Setup Guide - WhatsApp Number Checker Bot

Complete step-by-step guide to set up and run the WhatsApp Number Checker Bot.


📋 Prerequisites

Before you begin, ensure you have:

  • ✅ Node.js v16 or higher installed
  • ✅ npm package manager
  • ✅ Telegram account
  • ✅ Basic command line knowledge

🔧 Step-by-Step Installation

1️⃣ Get Your Bot Token

  1. Open Telegram and search for @BotFather
  2. Send /newbot command
  3. Follow the instructions:
    • Choose a name for your bot (e.g., "WhatsApp Checker Bot")
    • Choose a username (must end with 'bot', e.g., "whatsapp_checker_bot")
  4. Copy the bot token (looks like: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz)

2️⃣ Get Your Telegram ID

  1. Open @userinfobot on Telegram
  2. Send any message
  3. Copy your user ID (a number like: 123456789)

3️⃣ Clone the Repository

git clone https://github.com/YOUR_USERNAME/whatsapp-checker-bot.git
cd whatsapp-checker-bot

4️⃣ Install Dependencies

npm install

If you encounter any errors, try:

npm install --force

5️⃣ Configure the Bot

Open bot.js in a text editor and update these lines:

// Line ~18: Bot Token
const TELEGRAM_TOKEN = 'YOUR_TELEGRAM_BOT_TOKEN';  // Paste your token from BotFather

// Line ~19: Admin ID
const DEVELOPER_ID = YOUR_TELEGRAM_ID;  // Paste your Telegram ID (as number, no quotes)

// Line ~20: Your Username
const DEVELOPER_USERNAME = '@YOUR_USERNAME';  // Your Telegram username

6️⃣ Run the Bot

Windows:

start.bat

Or:

node bot.js

Linux/Mac:

node bot.js

✅ Verification

You should see:

🤖 Telegram Bot started (Multi-User Mode)...
👨‍💻 Developer: @YOUR_USERNAME (YOUR_ID)
✅ Each user will have their own WhatsApp session

🎯 First Steps

Test the Bot

  1. Open Telegram and search for your bot
  2. Send /start command
  3. You should see the welcome message with buttons

Connect WhatsApp

  1. Click "ربط WhatsApp" (Connect WhatsApp)
  2. Wait for QR Code to appear
  3. Open WhatsApp on your phone
  4. Go to: Settings > Linked Devices
  5. Click "Link a Device"
  6. Scan the QR Code

Check Your First Numbers

  1. Click "فحص الأرقام" (Check Numbers)
  2. Send numbers in this format:
201234567890
966512345678
971501234567
  1. Wait for results

🔧 Advanced Configuration

Session Management

Sessions are stored in auth_info_baileys/user_CHATID/

To delete a user's session:

# Windows
rmdir /s /q auth_info_baileys\user_CHATID

# Linux/Mac
rm -rf auth_info_baileys/user_CHATID

To delete all sessions:

# Windows
rmdir /s /q auth_info_baileys

# Linux/Mac
rm -rf auth_info_baileys

Clean Sessions Script

Use the provided batch file:

clean-sessions.bat

🐛 Troubleshooting

Bot doesn't respond

Problem: Bot is not responding to commands

Solutions:

  • Check if the bot token is correct
  • Verify the bot is running (check terminal)
  • Make sure you're using the correct bot username
  • Check if the bot is not blocked by Telegram

QR Code not appearing

Problem: QR Code doesn't show up

Solutions:

  • Wait 5-10 seconds
  • Click "تجديد QR Code" (Refresh QR)
  • Check internet connection
  • Restart the bot

"Cannot find module" error

Problem: Missing dependencies

Solution:

npm install

Or force install:

npm install --force

Connection keeps dropping

Problem: WhatsApp disconnects frequently

Solutions:

  • Check internet stability
  • Don't logout from WhatsApp on phone
  • Keep the bot running continuously
  • Restart the bot if needed

Numbers not checking correctly

Problem: All numbers show as inactive

Solutions:

  • Verify WhatsApp is connected (check status)
  • Ensure number format is correct (no + or spaces)
  • Check if WhatsApp account is not banned
  • Try with known active numbers first

📊 Monitoring

View Logs

The bot prints logs to the console. To save logs:

Windows:

node bot.js > bot.log 2>&1

Linux/Mac:

node bot.js > bot.log 2>&1

Check Bot Status

Use the admin panel:

  1. Send /start to the bot
  2. Click "📈 إحصائيات المستخدمين" (User Statistics)
  3. View active connections and user data

🔄 Updating

To update the bot:

git pull origin main
npm install

Then restart the bot.


🆘 Getting Help

If you encounter issues:

  1. Check the Troubleshooting section
  2. Review the README.md
  3. Contact support:

🎉 Success!

Your WhatsApp Number Checker Bot is now ready to use!

Next Steps:

  • Test with a few numbers
  • Share the bot with users
  • Monitor the statistics
  • Explore admin features

Made with ❤️ by ✘ 𝙍𝘼𝙑𝙀𝙉