A powerful Facebook Messenger bot with commands for media downloading, uptime tracking, and more. Built for ease of use and customization.
Kenji Cloud is an open-source bot designed to enhance Messenger group chats with features like video downloads (Facebook, Instagram, TikTok, YouTube), uptime monitoring, and custom goodbye messages. It’s lightweight, extensible, and perfect for community management.
- Node.js: Runtime for the bot.
- JavaScript: Core scripting language.
- HTML/CSS: For web dashboard.
- Axios: HTTP requests for APIs.
- Express: Web server framework.
- MongoDB: Data persistence.
- Git: Version control.
- Node.js (v18+)
- npm (comes with Node.js)
- Git
- A Facebook account for app state
- Internet connection
-
Clone the Repository:
git clone https://github.com/1dev-hridoy/Kenji-Cloud.git cd Kenji-Cloud
-
Install Dependencies:
npm install
-
Set Up Environment:
-
Edit
config/config.json
with:{ "botName": "Kenji Cloud", "prefix": "!", "botpicture": "https://i.ibb.co/Xxmdjjfm/Flux-Dev-cinematic-keyframe13-anime-keyframe12-Animestyle-port-2.jpg", "ownerName": "Hridoy", "ownerUID": "61575746590997", "adminUIDs": [ "61575746590997", "another uid" ] }
-
Use the c3c utility extension to export a fresh Facebook app state and save it as
appstate.json
.
-
-
Create Directories:
mkdir config logger/logs database database/backup temp modules/commands/nayan
-
Run the Bot:
node .
- Enter 2FA if prompted.
- Access the dashboard at
http://localhost:3000
.
-
Test Commands:
- Try
!dl https://www.facebook.com/share/v/1J2zkAmJke/
or!uptime
.
- Try
Create a file in modules/commands/
(e.g., hello.js
):
module.exports = {
config: {
name: 'hello',
version: '1.0',
author: 'Hridoy',
countDown: 5,
prefix: true,
adminOnly: false,
aliases: ['hlw', 'hi'],
description: 'replay hello message',
category: 'box chat',
guide: {
en: ' {pn}hello]'
},
module.exports.run = async ({ api, event }) => {
api.sendMessage("Hello! 👋", event.threadID);
};
- Use
!hello
to trigger it.
Add adminOnly: true,
to restrict to admins (0 for all, 1 for admins):
module.exports = {
config: {
name: 'hello',
version: '1.0',
author: 'Hridoy',
countDown: 5,
prefix: true,
adminOnly: true,
aliases: ['hlw', 'hi'],
description: 'replay hello message',
category: 'box chat',
guide: {
en: ' {pn}hello]'
},
},
module.exports.run = async ({ api, event }) => {
api.sendMessage("This is an admin command!", event.threadID);
};
- Only admins can use
!admincmd
.
Set prefix: false
to trigger without a prefix:
module.exports = {
config: {
name: '`noprefix',
version: '1.0',
author: 'Hridoy',
countDown: 5,
prefix: false,
adminOnly: false,
aliases: ['hlw', 'hi'],
description: 'replay hello message',
category: 'box chat',
guide: {
en: ' {pn}hello]'
},
module.exports.run = async ({ api, event }) => {
if (event.body.toLowerCase() === "noprefix") {
api.sendMessage("No prefix needed! 😄", event.threadID);
}
};
- Typing
noprefix
triggers it.
Add groupAdminOnly: true
to restrict to group admins:
module.exports.config = {
name: "groupadmin",
version: "1.0",
author: "Hridoy",
countDown: 5,
prefix: true,
groupAdminOnly: true,
description: "Group admin-only command.",
category: "admin"
};
module.exports.run = async ({ api, event }) => {
api.sendMessage("Only group admins can see this!", event.threadID);
};
- Only group admins can use
!groupadmin
.
- Developer: Hridoy (1dev-hridoy)
- Facebook: https://www.facebook.com/1dev.hridoy/
- Email: bgmohammedhridoy@gmail.com (replace with actual email)
- Messenger: Contact Support
- Telegram: Join Telegram
- Discord Server: Join Discord
Feel free to report issues, suggest features, or seek help!
Fork the repo, make changes, and submit a pull request. All contributions are welcome!
MIT License