raza-kashif
v1.5.3
Published
Facebook Chat API Bot by Kashif Raza - Advanced Messenger Integration
Maintainers
Readme
🚀 Raza-Kashif | Advanced Facebook Chat API Bot
A Powerful and Secure Facebook Messenger Bot Framework with Advanced Integration Features
📋 Table of Contents
- Features
- Installation
- Quick Start
- Configuration
- Usage Examples
- Advanced Features
- API Reference
- Contributing
- Contact
- License
✨ Features
Core Functionality
- ✅ Full Messenger API Support - Complete Facebook Messenger integration
- ✅ Real-time Message Handling - Instant message reception and processing
- ✅ Group Management - Create, modify, and manage Facebook groups
- ✅ User Management - Add/remove members, manage permissions
- ✅ Media Support - Send images, videos, documents, and attachments
- ✅ Story Management - Post and manage stories
- ✅ Typing Indicators - Show user when bot is typing
- ✅ Message Reactions - Like, love, laugh reactions on messages
Security Features
- 🔒 AES-256 Encryption - Military-grade encryption for sensitive data
- 🔐 Secure Authentication - Two-factor authentication support
- 🛡️ Auto-Login - Secure credential storage and auto-login
- 🔑 Token Management - Automatic token refresh and management
- ⚠️ Bypass Detection - Facebook checkpoint (956) bypass support
Performance & Reliability
- ⚡ Memory Optimization - Automatic memory leak detection and repair
- 📊 Auto-Restart - Configurable automatic restart on crashes
- 📈 Uptime Monitoring - Real-time uptime tracking
- 🔄 MQTT Support - Real-time data synchronization
- 📝 Logging System - Comprehensive logging with rotation
Developer Features
- 📚 Rich API - 50+ API functions for bot control
- 🎨 Customizable - Extensive configuration options
- 🌐 Multi-Language - Vietnamese and English support
- 🔧 DevMode - Built-in development mode for debugging
- 📦 Easy Installation - Simple npm installation
- 🚀 Hot Reload - Automatic code reload support
📦 Installation
Via NPM (Recommended)
npm install raza-kashifVia GitHub
git clone https://github.com/nobita136/raza-kashif.git
cd raza-kashif
npm installRequirements
- Node.js >= 14.x
- npm or yarn
- Facebook Account
- Valid Messenger Session
🚀 Quick Start
Basic Setup
const fca = require('raza-kashif');
fca({
email: '[email protected]',
password: 'your-password'
}, (error, api) => {
if (error) return console.error(error);
// Listen for incoming messages
api.listenMqtt((error, event) => {
if (event.type === 'message') {
console.log('New message:', event.body);
// Send a reply
api.sendMessage('Hello! 👋', event.threadID);
}
});
});Configuration File
The bot automatically creates a FastConfigFca.json file with default settings:
{
"Language": "vi",
"PreKey": "KashifRaza",
"AutoUpdate": false,
"MainColor": "#9900FF",
"MainName": "[ Kashif Raza ]",
"DevMode": false,
"AutoLogin": false,
"Login2Fa": false,
"BroadCast": true
}⚙️ Configuration
FastConfigFca.json Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| Language | String | vi | Bot language (en, vi) |
| MainName | String | [ Kashif Raza ] | Display name in logs |
| MainColor | String | #9900FF | Color code for output |
| AutoLogin | Boolean | false | Auto-login on restart |
| Login2Fa | Boolean | false | Two-factor authentication |
| DevMode | Boolean | false | Enable debug mode |
| AutoUpdate | Boolean | false | Auto-update checking |
| BroadCast | Boolean | true | Send notifications |
| EncryptFeature | Boolean | true | Encrypt sensitive data |
| Uptime | Boolean | false | Track bot uptime |
💡 Usage Examples
1. Message Handling
api.listenMqtt((error, event) => {
if (event.type === 'message') {
const { threadID, senderID, body } = event;
if (body.toLowerCase() === 'ping') {
api.sendMessage('Pong! 🏓', threadID);
}
}
});2. Send Rich Messages
// Send message with attachments
api.sendMessage({
body: 'Check this out!',
attachments: [{
attachment: fs.createReadStream('/path/to/image.png')
}]
}, threadID);3. Group Management
// Create a new group
api.createNewGroup(['uid1', 'uid2'], 'Group Name', (error, groupId) => {
if (!error) console.log('Group created:', groupId);
});
// Change group title
api.setTitle('New Group Title', threadID);
// Add user to group
api.addUserToGroup('uid', threadID);4. User Information
api.getUserInfo('userid', (error, info) => {
if (!error) console.log(info);
});
api.getFriendsList((error, list) => {
if (!error) console.log('Friends:', list);
});5. Message Management
// Mark as read
api.markAsRead(threadID);
// Set reaction
api.setMessageReaction('❤️', messageID);
// Edit message
api.editMessage('Updated text', messageID);
// Unsend message
api.unsendMessage(messageID);6. Typing Indicator
// Show typing indicator
api.sendTypingIndicator(threadID);
// Hide after 3 seconds
setTimeout(() => {
api.markAsDelivered(threadID);
}, 3000);🔧 Advanced Features
Memory Management
Enable automatic memory leak detection and repair:
{
"AntiStuckAndMemoryLeak": {
"AutoRestart": {
"Use": true,
"Explain": "Restart when memory reaches 90%"
},
"LogFile": {
"Use": true,
"Explain": "Log memory usage to Raza_DataBase/memory.logs"
}
}
}Two-Factor Authentication Bypass
{
"CheckPointBypass": {
"956": {
"Allow": true,
"Difficult": "Easy",
"Notification": "2FA Bypass Active"
}
}
}Encryption
All sensitive data is encrypted using AES-256:
const Security = require('./Extra/Security');
const encrypted = Security.Encrypt('sensitive-data');
const decrypted = Security.Decrypt(encrypted);Database Management
Local SQLite database for storing user data:
const Database = require('./Extra/Database');
const db = Database();
db.set('AccountEmail', '[email protected]');
db.get('AccountEmail');
db.delete('AccountEmail');📚 API Reference
Core Methods
listenMqtt(callback)
Listen for real-time events via MQTT connection.
sendMessage(message, threadID, callback)
Send a message to a thread (user or group).
setTitle(title, threadID, callback)
Set the title/name of a conversation.
getThreadInfo(threadID, callback)
Get detailed information about a thread.
getUserInfo(uid, callback)
Get user profile information.
setMessageReaction(reaction, messageID, callback)
React to a message with emoji.
editMessage(text, messageID, callback)
Edit a previously sent message.
unsendMessage(messageID, callback)
Delete a message from both users.
createNewGroup(userList, title, callback)
Create a new group chat.
addUserToGroup(uid, groupID, callback)
Add user to an existing group.
removeUserFromGroup(uid, groupID, callback)
Remove user from a group.
getFriendsList(callback)
Get list of all friends.
getThreadList(limit, timestamp, callback)
Get list of conversations.
markAsRead(threadID, callback)
Mark all messages as read.
sendTypingIndicator(threadID, callback)
Show typing indicator.
🔄 Update Command
To update the FCA to the latest version:
npm update raza-kashifOr reinstall the latest version:
npm install raza-kashif@latest📝 Scripts
# Start the bot
npm start
# Run tests
npm test
# Publish to npm (maintainers only)
npm run publish🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📞 Contact
Kashif Raza
- WhatsApp: +923003310470
- Email: [email protected]
- GitHub: @nobita136
- Repository: https://github.com/nobita136/raza-kashif
- NPM Package: https://www.npmjs.com/package/raza-kashif
⚠️ Disclaimer
This library is for educational and authorized use only. Unauthorized access to computer systems is illegal. Users are responsible for their own actions and compliance with Facebook's Terms of Service.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Original FCA team
- KanzuWakazaki & HZI Team
- All contributors and users
📊 Stats
Made with ❤️ by Kashif Raza
Stay Updated | Star the Repository | Share with Friends
