An open API service indexing awesome lists of open source software.

https://github.com/nat9h/katsumi

WhatsApp Bot using Baileys, MySQL and MongoDB.
https://github.com/nat9h/katsumi

baileys bot-whatsapp mongodb mysql whatsapp-bot

Last synced: 4 months ago
JSON representation

WhatsApp Bot using Baileys, MySQL and MongoDB.

Awesome Lists containing this project

README

          


Katsumi


Katsumi

# 🌸 Why You'll Love Katsumi

- ⚑ Lightning Fast: Feels instant, even with tons of features!
- 🧩 Plug & Play Modular: Add new features as simply as drag-and-drop.
- πŸ—„οΈ Data Your Way: Works with MySQL, MongoDB, or simple JSON.
- πŸ¦„ Extreme Customization: Change all settings in one `.env` fileβ€”no headaches!

## 🌈 Core Features

### πŸ”— Multi-Database

> Use **MongoDB**, **MySQL**, or JSONβ€”effortless to switch. Perfect for any deployment style.

### πŸŽ›οΈ Plugin System

> Every feature is a tidy module. Install, remove, or upgrade with zero pain. Minimal bloat, max power.

### πŸ› οΈ Full Customization

> Tweak bot prefixes, owner, DB, experimental flags, and more via `.env`.

## πŸš€ Getting Started

#### 1. Clone Katsumi

```bash
git clone https://github.com/nat9h/Katsumi.git
cd Katsumi
```

#### 2. Install Everything

```bash
npm install
```

#### 3. Set Up Your Environment

```bash
cp .env.example .env
```

#### 4. Edit `.env` With Your Settings

| Variable | Description | Default |
| ---------------- | ----------------------------------- | ---------------------------------- |
| MYSQL_HOST | MySQL database host | localhost |
| MYSQL_PORT | MySQL database port | 3306 |
| MYSQL_USER | MySQL username | root |
| MYSQL_PASSWORD | MySQL password | password |
| MYSQL_DATABASE | MySQL database name | baileys |
| BOT_SESSION_NAME | Session storage identifier | session |
| BOT_PREFIXES | Command prefixes (comma-separated) | !,.,? |
| USE_MONGO | Enable MongoDB storage (true/false) | false |
| MONGO_URI | MongoDB connection URI | mongodb://localhost:27017/database |

---

## πŸ’₯ Running the Bot

- **Production:**
```bash
npm start
```
- **Development (auto-reload):**
```bash
npm run dev
```
- **Using PM2:**
```bash
npm run pm2
```

---

## 🌟 Plugins: Power & Simplicity

Every plugin = a single `.js` file.
_Example: `ping.js` β€” shows latency & server info._

```javascript
import os from "os";
import { performance } from "perf_hooks";

export default {
name: "ping",
description: "Displays bot response speed and server info",
command: ["ping", "p"],
permissions: "all",
hidden: false,
category: "info",
cooldown: 0,

async execute(m) {
const start = performance.now();
const ram = (os.totalmem() / Math.pow(1024, 3)).toFixed(2) + " GB";
const freeRam = (os.freemem() / Math.pow(1024, 3)).toFixed(2) + " GB";
await m.reply(
`πŸš€ *PONG!*
⏱️ Response Time: ${(performance.now() - start).toFixed(2)}ms
πŸ’» CPU: ${os.cpus().length} Core(s)
πŸ“¦ RAM: ${freeRam} / ${ram}
πŸ†™ Uptime: ${Math.floor(os.uptime() / 86400)} days`
);
},
};
```

or

```javascript
import os from "os";
import { performance } from "perf_hooks";

export default {
name: "ping",
description: "Displays bot response speed and server info",
command: ["ping", "p"],
permissions: "all",
hidden: false,
category: "info",
cooldown: 0,

execute: async (m) => {
const start = performance.now();
const ram = (os.totalmem() / Math.pow(1024, 3)).toFixed(2) + " GB";
const freeRam = (os.freemem() / Math.pow(1024, 3)).toFixed(2) + " GB";
await m.reply(
`πŸš€ *PONG!*
⏱️ Response Time: ${(performance.now() - start).toFixed(2)}ms
πŸ’» CPU: ${os.cpus().length} Core(s)
πŸ“¦ RAM: ${freeRam} / ${ram}
πŸ†™ Uptime: ${Math.floor(os.uptime() / 86400)} days`
);
},
};
```

**Result:**

```
πŸš€ PONG!
⏱️ Response Time: 12.34ms
πŸ’» CPU: 8 Core(s)
πŸ“¦ RAM: 3.21 GB / 16.00 GB
πŸ†™ Uptime: 15 days
```

---

### 🎯 Plugin Option Reference

| Option | Description | Example/Values |
| ----------- | ----------------------- | ----------------------- |
| command | Plugin triggers | ["ping", "p"] |
| permissions | Who can use | "all", "admin", "owner" |
| category | Help menu group | "info", "utils", ... |
| cooldown | Cooldown in seconds | 0 (no cooldown) |
| group | Enable in groups? | true/false |
| private | Enable in private chat? | true/false |

---

## πŸ§‘β€πŸ’» Dev Tools

- **Lint:**
```bash
npm run lint
```
- **Prettier:**
```bash
npm run prettier
```

---



πŸš€ Get Katsumi on GitHub Β |Β 
Report Issue



MIT License Β© 2025 Natsumi Β |Β  Made with β™₯