Skip to content

sntdashi/bot-p3verse-1.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– P3Verse WhatsApp Bot

Version Node License Status

A powerful, feature-rich WhatsApp bot built with Baileys

Features โ€ข Installation โ€ข Commands โ€ข Configuration โ€ข Contributing


โœจ Features

๐ŸŽ“ Class Group Tools

  • Auto Group Division - Randomly divide members into balanced groups
  • Links Manager - Store & categorize important links (Zoom, Drive, Forms, etc.)
  • Quick Polls - Create instant polls for class decisions
  • Assignment Tracker - Track deadlines with visual countdowns
  • Schedule Manager - Manage class schedules with reminders

๐Ÿ›ก๏ธ Moderation & Security

  • Anti-Toxic System - Auto-detect & warn toxic language (3-strike system)
  • Anti-Link Protection - Auto-kick users posting WhatsApp group links
  • Ban System - Ban/unban users with persistent storage
  • Dynamic Word Filter - Add/remove toxic words on the fly
  • Admin Management - Multi-level admin system with owner protection

๐ŸŽฎ Fun & Engagement

  • Games - Tebak angka and more
  • Quote Generator - Daily motivational quotes
  • AI Chat - Conversational AI assistant

๐Ÿ“ฅ Downloader Tools

  • Instagram Downloader - Download IG photos & videos
  • TikTok Downloader - Download TikTok videos without watermark
  • YouTube Music - Search & download music

๐ŸŒ Utility Tools

  • Wikipedia Search - Quick wiki lookups
  • Translator - Multi-language translation
  • Text-to-Speech - Convert text to voice messages
  • GitHub Stats - View GitHub user statistics
  • Lyrics Finder - Search song lyrics

๐Ÿ‘ฅ Group Management

  • Kick/Promote/Demote - Member management
  • Tag All - Mention all members
  • Hidden Tag - Send messages with hidden mentions
  • Open/Close Group - Control group settings
  • Get Link - Retrieve group invitation link

๐Ÿš€ Installation

Prerequisites

  • Node.js v16 or higher
  • npm or yarn
  • Git (optional)

Quick Start

# Clone repository
git clone https://github.com/sntdashi/bot-p3verse-1.0.git
cd bot-p3verse-1.0

# Install dependencies
npm install

# Configure bot (edit len.js)
nano len.js

# Run bot
npm start

First Time Setup

  1. Configure Owner & Admins

    Edit len.js:

    global.owner = '628YOURPHONE@s.whatsapp.net'
    global.admin = ['628YOURPHONE@s.whatsapp.net']
  2. Run the Bot

    npm start
  3. Scan QR Code

    • QR code will appear in terminal
    • Open WhatsApp โ†’ โ‹ฎ โ†’ Linked Devices
    • Tap Link a Device
    • Scan the QR code
    • Done! โœ…

๐Ÿ“ฑ Commands

Note: All commands support both mobile-friendly comma (,) and desktop pipe (|) delimiters

๐Ÿ‘‘ Admin & Owner Commands

Command Description Example
/addadmin Add new admin (owner only) /addadmin @user
/deladmin Remove admin (owner only) /deladmin @user
/listadmin View all bot admins /listadmin
/ban Ban user from bot /ban @user
/unban Unban user /unban @user
/listban View banned users /listban
/addtoxic Add word to filter (owner) /addtoxic word1 word2
/deltoxic Remove filtered word (owner) /deltoxic word1
/listtoxic View filtered words /listtoxic

๐ŸŽ“ Class Group Tools

Command Description Example
/bagikelompok jumlah <N> Divide into N groups /bagikelompok jumlah 5
/bagikelompok max <N> Max N members per group /bagikelompok max 4
/setlink Save link /setlink Zoom, https://zoom.us/xxx
/links View all saved links /links
/dellink <N> Delete link #N /dellink 1
/poll Create poll /poll Question, A, B, C
/jadwal [day] View schedule /jadwal or /jadwal senin
/setjadwal Set schedule (admin) /setjadwal senin 08:00 ...
/addpr Add assignment /addpr Math, Page 50, Tomorrow
/listpr View assignments /listpr
/delpr <N> Delete assignment #N /delpr 1

๐ŸŽฎ Fun & Games

Command Description Example
/tebakangka Start number guessing game /tebakangka
/tebak <N> Guess the number /tebak 50
/quote Get random quote /quote

๐Ÿค– AI & Tools

Command Description Example
/ai Ask AI anything /ai What is JavaScript?
/wiki Wikipedia search /wiki Python programming
/translate Translate text /translate en Hello World
/tts Text to speech /tts Hello everyone

๐Ÿ“ฅ Downloaders

Command Description Example
/igdl Download Instagram /igdl https://instagram.com/p/xxx
/ttdl Download TikTok /ttdl https://tiktok.com/@xxx
/play Download music /play Imagine - John Lennon
/lirik Get song lyrics /lirik Imagine

๐Ÿ‘ฅ Group Management (Admin)

Command Description Example
/kick Kick member /kick @user
/promote Make admin /promote @user
/demote Remove admin /demote @user
/tagall Tag all members /tagall Important!
/hidetag Hidden tag /hidetag Message
/open Open group /open
/close Close group /close
/linkgroup Get group link /linkgroup

โš™๏ธ Configuration

Basic Settings (len.js)

// Bot Owner (Full Control)
global.owner = '628XXXXXXXXXX@s.whatsapp.net'

// Bot Admins (Can use admin commands)
global.admin = [
    '628XXXXXXXXXX@s.whatsapp.net',  // Owner
    '628YYYYYYYYYY@s.whatsapp.net'   // Additional admin
]

// Command Prefix
global.prefix = '/'

// Bot Image
global.image = './database/image/KucingLucu.jpeg'

Pairing Methods

QR Code (Default - Recommended)

  1. Run npm start
  2. QR code appears in terminal
  3. Scan with WhatsApp

Pairing Code (Alternative)

  1. Edit index.js: const usePairingCode = true
  2. Run npm start
  3. Enter phone number
  4. Use pairing code in WhatsApp

๐Ÿ› ๏ธ Troubleshooting

Error: "Bad MAC"

Cause: Corrupted session

Solution:

# Delete session folder
rm -rf LenwySesi

# Or on Windows
rmdir /s LenwySesi

# Restart bot
npm start

Bot Not Responding

  1. Check if bot is online in WhatsApp
  2. Verify command prefix matches (/ by default)
  3. Check if user is banned
  4. Ensure bot is admin (for group features)

Session Expired

  • Bot will auto-reconnect
  • If fails repeatedly, delete LenwySesi and re-pair

๐Ÿ“‚ Project Structure

bot-p3verse-1.0/
โ”œโ”€โ”€ index.js              # Main entry point
โ”œโ”€โ”€ lenwy.js              # Command handler
โ”œโ”€โ”€ len.js                # Configuration
โ”œโ”€โ”€ package.json          # Dependencies
โ”œโ”€โ”€ utils/                # Utility functions
โ”‚   โ””โ”€โ”€ helpers.js        # Helper functions
โ”œโ”€โ”€ database/             # Data storage
โ”‚   โ”œโ”€โ”€ users.json        # User database
โ”‚   โ”œโ”€โ”€ banned.json       # Banned users
โ”‚   โ”œโ”€โ”€ links.json        # Saved links
โ”‚   โ”œโ”€โ”€ toxic_words.json  # Filtered words
โ”‚   โ”œโ”€โ”€ jadwal.json       # Schedules
โ”‚   โ””โ”€โ”€ pr.json           # Assignments
โ”œโ”€โ”€ scrape/               # Web scrapers
โ”‚   โ”œโ”€โ”€ Ai4Chat.js        # AI scraper
โ”‚   โ””โ”€โ”€ Tiktok.js         # TikTok scraper
โ””โ”€โ”€ LenwySesi/            # WhatsApp session (auto-generated)

๐Ÿ”’ Security & Privacy

  • โœ… Session files in .gitignore
  • โœ… No data sent to external servers (except API calls)
  • โœ… Local database storage
  • โœ… Owner-only sensitive commands
  • โœ… Per-group data isolation

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Coding Standards

  • Use ES Module syntax
  • Follow existing code style
  • Add comments for complex logic
  • Test before submitting

๐Ÿ“ License

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

๐Ÿ‘จโ€๐Ÿ’ป Author

Lenwy

๐Ÿ™ Acknowledgments

โญ Star History

If this project helped you, please give it a โญ!


Made with โค๏ธ by Lenwy

Report Bug โ€ข Request Feature

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors