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.
- Host: GitHub
- URL: https://github.com/nat9h/katsumi
- Owner: nat9h
- License: mit
- Created: 2025-05-30T08:33:46.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-24T16:18:49.000Z (4 months ago)
- Last Synced: 2025-06-24T17:29:52.775Z (4 months ago)
- Topics: baileys, bot-whatsapp, mongodb, mysql, whatsapp-bot
- Language: JavaScript
- Homepage:
- Size: 242 KB
- Stars: 8
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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
```
---