A customized and powerful multi-purpose chatbot framework for Facebook Messenger
Enhanced version of GoatBot V2 - Modified and maintained by Sheikh Tamim
- Features
- Command Structure
- Configuration Guide
- Installation & Setup
- Premium System
- ST-FCA (Custom Facebook API)
- Advanced Features
- Dashboard
- ST Handlers Store
- AI Command (STAI)
- Support & Community
- License
- Modular Command System - Easy to add/remove commands
- Premium System - Advanced premium user management
- Fast and Scalable - Optimized bot core for high performance
- Auto-restart and Watchdog - Self-healing capabilities
- MongoDB/SQLite Support - Flexible database options
- Dynamic Command Loader - Hot-reload commands without restart
- Thread Approval System - Control bot access to groups
- Anti-React System - Advanced message management
- Real-time Dashboard - Live monitoring with WebSocket
- Easy Deployment - One-click deployment on Replit & Render
- Custom ST-FCA - Optimized Facebook Chat API
- Bot Logging System - Comprehensive logging configuration
- Prefix Management - Global and per-thread prefix control
- Bio Update System - Automatic bio updates
- Startup Notifications - Configurable startup messages
Every command in ST-BOT follows a standardized structure for consistency and ease of development:
module.exports = {
config: {
name: "commandname", // Command name (lowercase)
aliases: ["alias1", "alias2"], // Alternative names
version: "1.0.0", // Command version
author: "Your Name", // Author name
countDown: 5, // Cooldown in seconds
role: 0, // 0: Everyone, 1: Group Admin, 2: Bot Admin
premium: false, // true: Premium only, false: Everyone
usePrefix: true, // true: Requires prefix, false: No prefix needed
description: "Command description",
category: "category name",
guide: "{pn} <usage guide>" // Usage instructions
},
langs: {
en: {
success: "Command executed successfully!",
error: "An error occurred!"
}
},
onStart: async function({ message, args, event, api, getLang }) {
// Main command logic
message.reply(getLang("success"));
},
onReply: async function({ message, Reply, event, api }) {
// Handle user replies to bot messages
},
onChat: async function({ message, event, args }) {
// Listen to all messages (without prefix)
},
onReaction: async function({ message, Reaction, event, api }) {
// Handle reactions to bot messages
}
};message.reply(text)- Reply to user messagesmessage.send(text, threadID)- Send message to specific threadmessage.unsend(messageID)- Unsend a messagemessage.reaction(emoji, messageID)- React to a messagemessage.pr(processingMessage, processingEmoji, successEmoji, errorEmoji)- Advanced processing message handlerprocessingMessage(optional): Message to display during processing (default: "β³ Processing...")processingEmoji(optional): Emoji to react with during processing (default: "β³")successEmoji(optional): Emoji to react with on success (default: "β ")errorEmoji(optional): Emoji to react with on error (default: "β")- Returns object with methods:
edit(message),success(message),error(message)
api.sendMessage()- Direct API message sendinggetLang(key, ...args)- Get localized textusersData.get(userID)- Get user datathreadsData.get(threadID)- Get thread data
// Default emojis
const pr = await message.pr("β³ Processing your request...");
await pr.success("β
Done!");
// Custom emojis
const pr = await message.pr("π Working on it...", "π", "π", "π");
await pr.success("π All done!");
await pr.error("π Something went wrong!");Configure prefix usage in config.json:
{
"prefix": "!",
"usePrefix": {
"enable": true, // Global prefix requirement
"adminUsePrefix": {
"enable": true, // Admin prefix requirement
"specificUids": [] // Specific users who need prefix
}
}
}Options:
usePrefix.enable: true- All users must use prefixusePrefix.enable: false- No prefix required globallyadminUsePrefix.enable: true- Admins must use prefixadminUsePrefix.enable: false- Admins don't need prefixspecificUids: ["uid1", "uid2"]- Specific users affected by admin rules
Login credentials are set in config.json:
{
"botAccount": {
"email": "your_email@example.com",
"password": "your_password",
"userAgent": "Mozilla/5.0...",
"autoUseWhenEmpty": true
}
}Note: If account.txt is empty, the bot will automatically use credentials from config.json to fetch cookies.
- Clone the repository:
git clone https://github.com/sheikhtamimlover/ST-BOT.git && cp -r ST-BOT/. . && rm -rf ST-BOT- Install dependencies:
npm install-
Configure the bot:
- Set your Admin UID in
config.jsonβadminBotarray - Add your Facebook email/password in
config.jsonβbotAccount - Or add cookies directly in
account.txt(JSON format)
- Set your Admin UID in
-
Start the bot:
npm start- Click the "Deploy on Render" button above
- Configure your bot in
config.json - Click the Run button - Render handles everything automatically!
The bot includes a comprehensive premium user management system.
For Users:
- Request premium access:
.premium request <message> - Premium users get exclusive command access
For Admins:
- Add premium:
.premium add <uid/@mention> - Remove premium:
.premium remove <uid/@mention> - View premium users:
.premium list - Check pending requests:
.premium pending
module.exports = {
config: {
name: "premiumcommand",
premium: true, // Makes this command premium-only
role: 0,
// ... other config
},
onStart: async function({ message }) {
message.reply("π This is a premium feature!");
}
};ST-BOT uses ST-FCA - an optimized, custom-built Facebook Chat API for better performance and reliability.
npm install stfcaπ https://github.com/sheikhtamimlover/ST-FCA.git
- β Better stability and performance
- β Optimized for ST-BOT
- β Regular updates and bug fixes
- β Enhanced error handling
- β Improved cookie management
Control which groups can use your bot:
{
"threadApproval": {
"enable": true,
"adminNotificationThreads": ["thread_id"],
"autoApproveExisting": true,
"sendNotifications": true,
"sendThreadMessage": true,
"autoApprovedThreads": []
}
}Commands:
!threadapprove list- View all threads!threadapprove approve <tid>- Approve a thread!threadapprove unapprove <tid>- Unapprove a thread!threadapprove pending- View pending threads
Configure comprehensive logging:
{
"botLogging": {
"enable": true,
"sendToThreads": true,
"logThreadIds": ["thread_id"],
"sendToAdmins": false,
"silentOnDisabledThreads": true,
"logBotAdded": false,
"logBotKicked": true
}
}Admin-only message management through reactions:
{
"antiReact": {
"enable": true,
"reactByUnsend": {
"enable": true,
"emojis": ["π"]
},
"reactByRemove": {
"enable": true,
"emoji": "β "
},
"onlyAdminBot": true
}
}Automatically update bot bio:
{
"bioUpdate": {
"enable": true,
"bioText": "ST Bot - Your custom bio here",
"updateOnce": true
}
}Send notifications when bot starts:
{
"botStartupNotification": {
"enable": true,
"sendToThreads": {
"enable": true,
"threadIds": ["thread_id"]
},
"sendToAdmin": {
"enable": false,
"adminId": ""
},
"message": "π€ Bot is now online!"
}
}Access the powerful web dashboard with enhanced security:
{
"dashBoard": {
"enable": true,
"port": 3021,
"passwordProtection": {
"enable": true,
"password": "your_secure_password"
}
}
}Features:
- π Real-time statistics
- π₯ User management
- π Premium user control
- π Thread management
- π Command analytics
- π§ System monitoring
Browse, install, and share commands, events, and APIs!
!sthandlers # Open main menu
!sthandlers <filename> # Install from store
!sthandlers <name> <code> # Upload command
!sthandlers -e <name> <code> # Upload event
!sthandlers -p <filename> # Upload from file path- β Browse commands by category
- β Install commands instantly
- β Share your own creations
- β Version control
- β Auto-load installed commands
- β Community-driven content
The most advanced AI command with code generation and bug fixing capabilities!
- π§ Generate commands and events
- π Fix bugs in existing code
- π‘ Code suggestions and improvements
- π§ Auto-formatting and optimization
- π Documentation generation
!stai generate command <description>
!stai generate event <description>
!stai fix <command_name>
!stai improve <code>- π± Messenger Group: Join Support Group
- πΈ Instagram: @sheikh.tamim_lover
- π¬ Facebook: m.me/tormairedusi
- π Report Issues: Use
!streport <your issue>command
- β Active development and maintenance
- β Regular feature additions
- β Bug fixes and improvements
- β Community-driven enhancements
Use the built-in report command:
!streport <describe your issue or feature request>Your report will be sent directly to the developer!
| Command | Description | Access |
|---|---|---|
!help |
View all commands | All Users |
!prefix |
View/change prefix | Group Admin |
!premium request |
Request premium | All Users |
!premium add |
Add premium user | Bot Admin |
!threadapprove |
Manage thread approval | Bot Admin |
!botlog |
Configure bot logging | Bot Admin |
!sthandlers |
Access command store | All Users |
!stai |
AI assistant | All Users |
!streport |
Report issues | All Users |
!update |
Update bot | Bot Admin |
This project receives regular updates with:
- π New Features
- π Bug Fixes
- π Security Patches
- β‘ Performance Optimizations
- π Premium Features
Stay updated by:
- β Starring this repository
- π Watching for releases
- π± Following on Instagram
- π¬ Joining the support group
This project is licensed under the MIT License. You are free to use, modify, and distribute this software, but please maintain the original credits.
Original GoatBot V2 by NTKhang
Enhanced & Maintained by Sheikh Tamim
If you find this project helpful:
- β Star this repository
- π΄ Fork and contribute
- π’ Share with others
- π¬ Join our community
- π Follow on Instagram: @sheikh.tamim_lover
Happy Botting! π€β¨
Made with β€οΈ by Sheikh Tamim
GitHub: sheikhtamimlover/ST-BOT
ST-FCA: sheikhtamimlover/ST-FCA











