Built purely on GoatBot-V2 Foundation (NTKhang & NeoKEX) β’ Maintained by Gtajisan
βββββββ ββββββ βββ βββ ββββββ ββββββββββ βββ ββββββ ββββ βββ
βββββββββββββββββββ ββββββββββββ βββββββββββ ββββββββββββββββ βββ
βββββββββββββββββββββββ βββββββββββββββββ ββββββββββββββββββββββ βββ
βββββββββββββββββββββββ βββββββββββββββββ ββββββββββββββββββββββββββ
βββββββββββ ββββββ ββββββ βββ βββββββββββ ββββββ ββββββ ββββββ
βββββββ βββ ββββββ ββββββ βββ ββββββββββ ββββββ ββββββ βββββ
Baka-Chan Bot V2 is a production-grade Facebook Messenger chatbot engine built 100% on the official GoatBot-V2 architecture. Engineered for high performance, low memory footprint, multi-account rotation, and 24/7 reliability.
β¨ Key Features β’ π Quick Start β’ βοΈ Configuration β’ π¦ Multi-Account β’ π Command Engine β’ π Dashboard β’ π₯ Credits
- β‘ 100% Pure GoatBot-V2 Engine: Clean, unified codebase with zero bloat, powered by the latest optimizations from lazyneoaz/Goatbot-V2.
- π‘οΈ High-Performance MetaChat API: Built-in
@lazyneoaz/metachatengine with robust MQTT listening, presence management, typing indicators, and auto-reconnection. - π§ MemoryManager & Leak Prevention:
- Proactive heap monitoring with automatic V8 garbage collection (
--expose-gc). TTLMapcaching foronReplyandonReaction(30-minute auto-expiry, 500-item ceiling).- Memory-capped supervisor (
index.js) with instant crash restart and graceful shutdown handlers (gracefulShutdown.js).
- Proactive heap monitoring with automatic V8 garbage collection (
- π₯ Seamless Multi-Account Rotation: Built-in multi-account switching (
account.txt,account2.txt,account3.txt) with auto-relogin and live cookie validation. - πΎ Dual Database Engine:
- High-performance SQLite & MongoDB controllers with automatic JSON fallback.
- Thread and user data caching with batch synchronization.
- π Multi-Tier Permission Hierarchy:
0: Regular Group Member1: Group / Box Administrator2: Bot Administrator (adminBot)3: Premium User (premiumUsers)4: Developer / Superuser (devUsers)
- π Real-Time Web Dashboard: Full Express + EJS web dashboard with user management, thread logs, database viewer, and live socket status.
- π¨ Advanced Error Handling & Alerts: Automatic failure notifications via Discord Webhook, Telegram Bot, or Gmail when MQTT disconnects.
| Requirement | Minimum | Recommended |
|---|---|---|
| Node.js | v20.x+ | Node.js v20.x or v22.x LTS |
| NPM | v7.0.0+ | Latest NPM |
| RAM | 256 MB | 512 MB - 1 GB |
| Storage | 300 MB | 1 GB SSD |
| OS | Linux / Ubuntu / Debian | macOS / Windows 10+ / Docker |
git clone https://github.com/frnAlt/Baka-Chan-bot-fix.git
cd Baka-Chan-bot-fixnpm installPaste your Facebook AppState JSON (or cookie string) into account.txt:
[
{
"key": "c_user",
"value": "1000xxxx",
"domain": "facebook.com",
"path": "/"
},
{
"key": "xs",
"value": "xxxx",
"domain": "facebook.com",
"path": "/"
}
]Tip: You can configure additional backup accounts in
account2.txtandaccount3.txt!
Open config.json to customize your preferences:
{
"nickNameBot": "Baka-Chan",
"prefix": "!",
"adminBot": ["61582611751982"],
"timeZone": "Asia/Dhaka",
"database": {
"type": "sqlite",
"uriMongodb": ""
},
"dashBoard": {
"enable": true,
"port": 3001
}
}# Production mode (with Memory Management & Auto-Restart)
npm start
# Development mode
npm run dev| Key | Type | Description |
|---|---|---|
nickNameBot |
string |
Nickname assigned to the bot in threads. |
prefix |
string |
Command trigger prefix (e.g. !, /, .). |
adminBot |
array |
List of Facebook UIDs with full Bot Admin access (Role 2). |
premiumUsers |
array |
List of Facebook UIDs with VIP / Premium access (Role 3). |
devUsers |
array |
List of Facebook UIDs with Developer access (Role 4). |
whiteListMode |
object |
Restricts bot usage to whitelisted user IDs only. |
spamProtection |
object |
Auto-bans threads if command threshold is exceeded within window. |
database |
object |
Database selection (sqlite, mongodb, or json). |
timeZone |
string |
Timezone string (e.g., Asia/Dhaka, UTC). |
dashBoard |
object |
Web Dashboard toggle and port configuration (default 3001). |
Baka-Chan Bot V2 includes native GoatBot multi-account management:
- Place your primary account credentials / cookies in
account.txt. - Place secondary account credentials in
account2.txt,account3.txt, etc. - Multi-account state is managed automatically via
bot/login/multiAccountManager.js. - The bot automatically rotates or falls back to live accounts if one session expires.
All commands are located in scripts/cmds/ adhering to standard GoatBot V2 format:
module.exports = {
config: {
name: "ping",
version: "2.0.0",
author: "Gtajisan",
role: 0,
countDown: 5,
category: "utility",
shortDescription: "Check bot latency",
longDescription: "Checks system latency and response speed",
guide: "{pn}"
},
onStart: async function ({ api, event, message }) {
const start = Date.now();
await message.reply("π Pong!");
const latency = Date.now() - start;
return message.reply(`β‘ Latency: ${latency}ms`);
}
};onStart: Triggered when a command is executed.onReply: Triggered when a user replies to a message.onReaction: Triggered when a user reacts with an emoji.onChat: Triggered on incoming chat messages.onEvent: Triggered on thread events (member join/leave, nickname changes, theme updates).onLoad: Triggered once when the bot boots and registers the command.
Baka-Chan Bot V2 features a built-in web management dashboard:
- URL:
http://localhost:3001(or your host port) - Features:
- Real-time bot health, CPU, and RAM statistics.
- Thread management and member ranking.
- Ban / Unban threads and users.
- Interactive custom command manager and live logs.
- Lead Developer & Maintainer: Gtajisan aka Farhan (
frnAlt) - Original GoatBot-V2 Author: NTKhang
- GoatBot-V2 Modern Engine: NeoKEX / Lazyneoaz
This project is licensed under the MIT License.