diff --git a/README.md b/README.md
index 4bd375c85..07c426356 100644
--- a/README.md
+++ b/README.md
@@ -4,13 +4,13 @@ This is a WhatsApp bot built using the Baileys library for group management, inc
@@ -30,7 +30,7 @@ This is a WhatsApp bot built using the Baileys library for group management, inc
Click the button below to fork the Knight Bot repository to your GitHub account:
@@ -39,7 +39,7 @@ Click the button below to fork the Knight Bot repository to your GitHub account:
### Step 2: Get Pair Code
-Deploy the bot and easily connect it to your WhatsApp account by pair code. Click the button below to deploy the bot on Replit.
+Deploy the bot and easily connect it to your WhatsApp account by pair code. Click the button below to generate a pair code.
-
-### After getting creds.json file, upload it to session folder
+> After getting `creds.json` file, upload it to the `session` folder.
---
@@ -57,7 +56,7 @@ Deploy the bot and easily connect it to your WhatsApp account by pair code. Clic
For further customization and setup guidance, click the button below:
+---
+
### Deploy on VPS
+If you prefer a VPS deployment, here are recommended providers and a quick link:
+
-### Deploy on Below Panel
+---
+
+### Deploy Now on Panel (Katabump)
+
+---
+
### Join Us
@@ -95,13 +103,13 @@ For further customization and setup guidance, click the button below:
## βοΈ Features
-- **Tag all group members** with the `.tagall` command
-- **Admin restricted usage** (Only group admins can use certain commands)
-- **Games** like Tic-Tac-Toe for interactive group engagement
-- **Text-to-Speech** with `.tts`
-- **Sticker creation** with `.sticker`
-- **Anti-link detection** for group safety
-- **Warn and manage group members** with admin control
+- **Tag all group members** with the `.tagall` command
+- **Admin restricted usage** (Only group admins can use certain commands)
+- **Games** like Tic-Tac-Toe for interactive group engagement
+- **Text-to-Speech** with `.tts`
+- **Sticker creation** with `.sticker`
+- **Anti-link detection** for group safety
+- **Warn and manage group members** with admin control
---
@@ -117,15 +125,15 @@ It is lightweight and can be easily customized to add more commands as per your
### Prerequisites
-- Node.js installed on your system
-- Git installed (for cloning the repository)
+- Node.js installed on your system
+- Git installed (for cloning the repository)
### Step-by-Step Setup
1. **Clone the repository:**
```bash
- git clone https://github.com/mruniquehacker/Knightbot-MD.git
+ git clone https://github.com/wijesuriya2017/Knightbot-MD.git
cd Knightbot-MD
```
@@ -147,56 +155,14 @@ It is lightweight and can be easily customized to add more commands as per your
---
-
## π License
-This project is licensed under the [MIT License](https://opensource.org/licenses/MIT) - see the [LICENSE](https://github.com/mruniquehacker/Knightbot-MD/blob/main/LICENSE) file for details.
+This project is licensed under the [MIT License](https://opensource.org/licenses/MIT) - see the [LICENSE](https://github.com/wijesuriya2017/Knightbot-MD/blob/main/LICENSE) file for details.
---
## π Contributions
-Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/mruniquehacker/Knightbot-MD/issues).
-
----
-
-## π Show your support
-
-If you like this project, please give it a [βοΈ star on GitHub](https://github.com/mruniquehacker/Knightbot)!
-
-
-## Credits
-
-- [Professor](https://github.com/mruniquehacker)
-- [Baileys](https://github.com/adiwajshing/Baileys)
-- [TechGod143](https://github.com/TechGod143) for pair code
-- [Dgxeon](https://github.com/Dgxeon) for pair code
+Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/wijesuriya2017/Knightbot-MD/issues).
---
-
-## β οΈ Important Warning
-
-**Note:** This bot is created for educational purposes only. This is NOT an official WhatsApp bot. Using this bot may lead to your WhatsApp account being banned. Use it at your own risk. The developers will not be responsible for any consequences or account bans that may occur while using this bot.
-
-## π Legal
-
-- This project is not affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries.
-- This is an independent and unofficial software. Use at your own risk.
-- Do not spam people with this bot.
-- Do not use this bot to send bulk messages or for illegal purposes.
-- The developers assume no liability and are not responsible for any misuse or damage caused by this program.
-
-### License
-This project is licensed under the MIT License. However, you must:
-- Use this software in compliance with all applicable laws and regulations
-- Include original license and copyright notices
-- Credit original authors
-- Not use for spam or malicious purposes
-
-## π Copyright Notice
-
-Copyright (c) 2024 Professor. All rights reserved.
-
-This project contains code from various open source projects:
-- Baileys (MIT License)
-- Other libraries as listed in package.json
diff --git a/assets/bot_image.jpg b/assets/bot_image.jpg
index f0e1e3f99..619df00db 100644
Binary files a/assets/bot_image.jpg and b/assets/bot_image.jpg differ
diff --git a/commands/alive.js b/commands/alive.js
index 9892881cd..8bed7a1ea 100644
--- a/commands/alive.js
+++ b/commands/alive.js
@@ -18,7 +18,7 @@ async function aliveCommand(sock, chatId, message) {
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -30,4 +30,4 @@ async function aliveCommand(sock, chatId, message) {
}
}
-module.exports = aliveCommand;
\ No newline at end of file
+module.exports = aliveCommand;
diff --git a/commands/autoread.js b/commands/autoread.js
index b78e42be5..cefb66514 100644
--- a/commands/autoread.js
+++ b/commands/autoread.js
@@ -31,7 +31,7 @@ async function autoreadCommand(sock, chatId, message) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -62,7 +62,7 @@ async function autoreadCommand(sock, chatId, message) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -85,7 +85,7 @@ async function autoreadCommand(sock, chatId, message) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -100,7 +100,7 @@ async function autoreadCommand(sock, chatId, message) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -195,4 +195,4 @@ module.exports = {
isAutoreadEnabled,
isBotMentionedInMessage,
handleAutoread
-};
\ No newline at end of file
+};
diff --git a/commands/autostatus.js b/commands/autostatus.js
index 9a0b3bfd0..6e228f653 100644
--- a/commands/autostatus.js
+++ b/commands/autostatus.js
@@ -7,7 +7,7 @@ const channelInfo = {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -258,4 +258,4 @@ async function handleStatusUpdate(sock, status) {
module.exports = {
autoStatusCommand,
handleStatusUpdate
-};
\ No newline at end of file
+};
diff --git a/commands/autotyping.js b/commands/autotyping.js
index 42c0bbae6..6477ae541 100644
--- a/commands/autotyping.js
+++ b/commands/autotyping.js
@@ -31,7 +31,7 @@ async function autotypingCommand(sock, chatId, message) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -62,7 +62,7 @@ async function autotypingCommand(sock, chatId, message) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -85,7 +85,7 @@ async function autotypingCommand(sock, chatId, message) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -100,7 +100,7 @@ async function autotypingCommand(sock, chatId, message) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -222,4 +222,4 @@ module.exports = {
handleAutotypingForMessage,
handleAutotypingForCommand,
showTypingAfterCommand
-};
\ No newline at end of file
+};
diff --git a/commands/clearsession.js b/commands/clearsession.js
index 6c777fe93..e0e989d18 100644
--- a/commands/clearsession.js
+++ b/commands/clearsession.js
@@ -8,7 +8,7 @@ const channelInfo = {
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -98,4 +98,4 @@ async function clearSessionCommand(sock, chatId, msg) {
}
}
-module.exports = clearSessionCommand;
\ No newline at end of file
+module.exports = clearSessionCommand;
diff --git a/commands/github.js b/commands/github.js
index 770f557b6..16adba6fe 100644
--- a/commands/github.js
+++ b/commands/github.js
@@ -3,31 +3,146 @@ const fetch = require('node-fetch');
const fs = require('fs');
const path = require('path');
-
async function githubCommand(sock, chatId, message) {
try {
- const res = await fetch('https://api.github.com/repos/mruniquehacker/Knightbot-md');
+ // Fetch main repository info
+ const res = await fetch('https://api.github.com/repos/wijesuriya2017/Knightbot-MD');
if (!res.ok) throw new Error('Error fetching repository data');
const json = await res.json();
+ // Basic repository info
let txt = `*δΉ Knight Bot MD δΉ*\n\n`;
- txt += `β© *Name* : ${json.name}\n`;
- txt += `β© *Watchers* : ${json.watchers_count}\n`;
- txt += `β© *Size* : ${(json.size / 1024).toFixed(2)} MB\n`;
- txt += `β© *Last Updated* : ${moment(json.updated_at).format('DD/MM/YY - HH:mm:ss')}\n`;
- txt += `β© *URL* : ${json.html_url}\n`;
- txt += `β© *Forks* : ${json.forks_count}\n`;
- txt += `β© *Stars* : ${json.stargazers_count}\n\n`;
- txt += `π₯ *KnightBot MD*`;
-
- // Use the local asset image
- const imgPath = path.join(__dirname, '../assets/bot_image.jpg');
- const imgBuffer = fs.readFileSync(imgPath);
-
- await sock.sendMessage(chatId, { image: imgBuffer, caption: txt }, { quoted: message });
- } catch (error) {
+ txt += `β© *Name*: ${json.name}\n`;
+ txt += `β© *Size*: ${(json.size / 1024).toFixed(2)} MB\n`;
+ txt += `β© *Last Updated*: ${moment(json.updated_at).format('DD/MM/YY - HH:mm:ss')}\n`;
+ txt += `β© *URL*: ${json.html_url}\n`;
+ txt += `β© *Developer*: Navida Wijesuriya\n`;
+ txt += `β© *Features*: Auto-Reply, Group Tools, Fun Commands\n`;
+ txt += `β© *Status*: π Live and Improving\n\n`;
+ txt += `π₯ *KnightBot MD*\n\nβ¨ *Extra Info* β¨\n`;
+
+ const ownerRepo = json.full_name;
+
+ // Fetch extra details in parallel
+ const [commitRes, langsRes, pullsRes, releaseRes, contentsRes, repoRes] = await Promise.all([
+ fetch(`https://api.github.com/repos/${ownerRepo}/commits?per_page=1`).catch(() => null),
+ fetch(`https://api.github.com/repos/${ownerRepo}/languages`).catch(() => null),
+ fetch(`https://api.github.com/repos/${ownerRepo}/pulls?state=open&per_page=100`).catch(() => null),
+ fetch(`https://api.github.com/repos/${ownerRepo}/releases/latest`).catch(() => null),
+ fetch(`https://api.github.com/repos/${ownerRepo}/contents`).catch(() => null),
+ fetch(`https://api.github.com/repos/${ownerRepo}`, { headers: { 'Accept': 'application/vnd.github+json' } }).catch(() => null)
+ ]);
+
+ // Latest commit
+ if (commitRes?.ok) {
+ const commits = await commitRes.json();
+ if (Array.isArray(commits) && commits.length) {
+ const c = commits[0];
+ const msg = c.commit?.message.split('\n')[0] || 'No message';
+ const author = c.commit?.author?.name || c.author?.login || 'Unknown';
+ const date = c.commit?.author?.date || null;
+ const howLong = date ? moment(date).fromNow() : 'unknown time';
+ txt += `π§ Latest commit: "${msg}" β ${author} (${howLong})\n`;
+ }
+ }
+
+ // Languages breakdown
+ if (langsRes?.ok) {
+ const langs = await langsRes.json();
+ const total = Object.values(langs).reduce((a, b) => a + b, 0) || 1;
+ const topLangs = Object.entries(langs)
+ .sort((a,b) => b[1]-a[1])
+ .slice(0,4)
+ .map(([name, bytes]) => `${name} ${(bytes/total*100).toFixed(0)}%`);
+ if (topLangs.length) txt += `π§© Languages: ${topLangs.join(' β’ ')}\n`;
+ }
+
+ // Open PRs
+ if (pullsRes?.ok) {
+ const pulls = await pullsRes.json();
+ txt += `π Open PRs: ${Array.isArray(pulls) ? pulls.length : 0}\n`;
+ }
+
+ // Latest release or fallback to tag
+ let releaseLine = '';
+ if (releaseRes?.ok) {
+ const rel = await releaseRes.json();
+ if (rel?.tag_name) releaseLine = `π·οΈ Latest release: ${rel.tag_name} β ${rel.name || ''}`.trim();
+ } else {
+ try {
+ const tagsRes = await fetch(`https://api.github.com/repos/${ownerRepo}/tags?per_page=1`);
+ if (tagsRes?.ok) {
+ const tags = await tagsRes.json();
+ if (Array.isArray(tags) && tags.length) releaseLine = `π·οΈ Latest tag: ${tags[0].name}`;
+ }
+ } catch {}
+ }
+ if (releaseLine) txt += `${releaseLine}\n`;
+
+ // Repo topics
+ try {
+ let topics = json.topics || [];
+ if (!topics.length && repoRes?.ok) {
+ const repoData = await repoRes.json();
+ topics = repoData.topics || [];
+ }
+ if (topics.length) txt += `π·οΈ Topics: ${topics.slice(0,6).join(' Β· ')}\n`;
+ } catch {}
+
+ // Root folder snapshot
+ if (contentsRes?.ok) {
+ const contents = await contentsRes.json();
+ txt += `π Top-level items: ${Array.isArray(contents) ? contents.length : 0} (files & folders)\n`;
+ }
+
+ // Clone hint and bot commands
+ txt += `\nπ‘ Quick Tip: Clone β \`git clone ${json.html_url}.git\`\n`;
+ txt += `π Try commands: .tagall | .tts | .sticker | .welcome\n`;
+
+ // Community mood
+ const moods = ['π Open to contributors', 'π₯ Active development', 'π€ Welcomes PRs & ideas', 'β¨ Community-driven'];
+ txt += `\nπ Community: ${moods[Math.floor(Math.random()*moods.length)]}\n`;
+
+ // Badges
+ txt += `\nπ Badges:\n`;
+ txt += `https://img.shields.io/github/v/release/${json.full_name}?style=for-the-badge\n`;
+ txt += `https://img.shields.io/github/license/${json.full_name}?style=for-the-badge\n`;
+ txt += `https://img.shields.io/github/commit-activity/y/${json.full_name}?style=for-the-badge\n`;
+
+ // Top contributors (optional)
+ try {
+ const contribRes = await fetch(`https://api.github.com/repos/${json.full_name}/contributors?per_page=3`);
+ if (contribRes?.ok) {
+ const contributors = await contribRes.json();
+ if (Array.isArray(contributors) && contributors.length) {
+ txt += `\nπ₯ Top Contributors:\n`;
+ contributors.forEach((c,i) => txt += `${i+1}. ${c.login} β ${c.contributions} contribs\n`);
+ }
+ }
+ } catch {}
+
+ // Image handling (fallback to avatar)
+ let imgBuffer;
+ try {
+ imgBuffer = fs.readFileSync(path.join(__dirname, '../assets/bot_image.jpg'));
+ } catch {
+ try {
+ const avatarRes = await fetch(json.owner.avatar_url);
+ imgBuffer = await avatarRes.buffer();
+ } catch {
+ imgBuffer = null;
+ }
+ }
+
+ if (imgBuffer) {
+ await sock.sendMessage(chatId, { image: imgBuffer, caption: txt }, { quoted: message });
+ } else {
+ await sock.sendMessage(chatId, { text: txt }, { quoted: message });
+ }
+
+ } catch (err) {
await sock.sendMessage(chatId, { text: 'β Error fetching repository information.' }, { quoted: message });
}
}
-module.exports = githubCommand;
\ No newline at end of file
+module.exports = githubCommand;
diff --git a/commands/help.js b/commands/help.js
index 241e437e7..6fbb79645 100644
--- a/commands/help.js
+++ b/commands/help.js
@@ -7,7 +7,7 @@ async function helpCommand(sock, chatId, message) {
βββββββββββββββββββββ
*π€ ${settings.botName || 'KnightBot-MD'}*
Version: *${settings.version || '3.0.0'}*
- by ${settings.botOwner || 'Mr Unique Hacker'}
+ by ${settings.botOwner || 'Mr Navi'}
YT : ${global.ytch}
βββββββββββββββββββββ
@@ -237,7 +237,7 @@ Join our channel for updates:`;
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -251,8 +251,8 @@ Join our channel for updates:`;
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
- newsletterName: 'KnightBot MD by Mr Unique Hacker',
+ newsletterJid: '120363421047540687@newsletter',
+ newsletterName: 'KnightBot MD by Mr RC Jestor',
serverMessageId: -1
}
}
diff --git a/commands/img-blur.js b/commands/img-blur.js
index 03667af5a..9decced81 100644
--- a/commands/img-blur.js
+++ b/commands/img-blur.js
@@ -65,7 +65,7 @@ async function blurCommand(sock, chatId, message, quotedMessage) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -80,4 +80,4 @@ async function blurCommand(sock, chatId, message, quotedMessage) {
}
}
-module.exports = blurCommand;
\ No newline at end of file
+module.exports = blurCommand;
diff --git a/commands/pair.js b/commands/pair.js
index cc38bc0cd..b20c386d8 100644
--- a/commands/pair.js
+++ b/commands/pair.js
@@ -5,12 +5,12 @@ async function pairCommand(sock, chatId, message, q) {
try {
if (!q) {
return await sock.sendMessage(chatId, {
- text: "Please provide valid WhatsApp number\nExample: .pair 91702395XXXX",
+ text: "Please provide valid WhatsApp number\nExample: .pair 94702395XXXX",
contextInfo: {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -29,7 +29,7 @@ async function pairCommand(sock, chatId, message, q) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -48,7 +48,7 @@ async function pairCommand(sock, chatId, message, q) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -62,7 +62,7 @@ async function pairCommand(sock, chatId, message, q) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -85,7 +85,7 @@ async function pairCommand(sock, chatId, message, q) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -106,7 +106,7 @@ async function pairCommand(sock, chatId, message, q) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -122,7 +122,7 @@ async function pairCommand(sock, chatId, message, q) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -131,4 +131,4 @@ async function pairCommand(sock, chatId, message, q) {
}
}
-module.exports = pairCommand;
\ No newline at end of file
+module.exports = pairCommand;
diff --git a/commands/settings.js b/commands/settings.js
index 0513ca1ed..e912c45b0 100644
--- a/commands/settings.js
+++ b/commands/settings.js
@@ -25,11 +25,11 @@ async function settingsCommand(sock, chatId, message) {
const dataDir = './data';
const mode = readJsonSafe(`${dataDir}/messageCount.json`, { isPublic: true });
- const autoStatus = readJsonSafe(`${dataDir}/autoStatus.json`, { enabled: false });
- const autoread = readJsonSafe(`${dataDir}/autoread.json`, { enabled: false });
+ const autoStatus = readJsonSafe(`${dataDir}/autoStatus.json`, { enabled: true });
+ const autoread = readJsonSafe(`${dataDir}/autoread.json`, { enabled: true });
const autotyping = readJsonSafe(`${dataDir}/autotyping.json`, { enabled: false });
const pmblocker = readJsonSafe(`${dataDir}/pmblocker.json`, { enabled: false });
- const anticall = readJsonSafe(`${dataDir}/anticall.json`, { enabled: false });
+ const anticall = readJsonSafe(`${dataDir}/anticall.json`, { enabled: true });
const userGroupData = readJsonSafe(`${dataDir}/userGroupData.json`, {
antilink: {}, antibadword: {}, welcome: {}, goodbye: {}, chatbot: {}, antitag: {}
});
@@ -39,8 +39,8 @@ async function settingsCommand(sock, chatId, message) {
const groupId = isGroup ? chatId : null;
const antilinkOn = groupId ? Boolean(userGroupData.antilink && userGroupData.antilink[groupId]) : false;
const antibadwordOn = groupId ? Boolean(userGroupData.antibadword && userGroupData.antibadword[groupId]) : false;
- const welcomeOn = groupId ? Boolean(userGroupData.welcome && userGroupData.welcome[groupId]) : false;
- const goodbyeOn = groupId ? Boolean(userGroupData.goodbye && userGroupData.goodbye[groupId]) : false;
+ const welcomeOn = groupId ? Boolean(userGroupData.welcome && userGroupData.welcome[groupId]) : true;
+ const goodbyeOn = groupId ? Boolean(userGroupData.goodbye && userGroupData.goodbye[groupId]) : true;
const chatbotOn = groupId ? Boolean(userGroupData.chatbot && userGroupData.chatbot[groupId]) : false;
const antitagCfg = groupId ? (userGroupData.antitag && userGroupData.antitag[groupId]) : null;
diff --git a/commands/simp.js b/commands/simp.js
index 23c3fb036..578e5994e 100644
--- a/commands/simp.js
+++ b/commands/simp.js
@@ -37,7 +37,7 @@ async function simpCommand(sock, chatId, quotedMsg, mentionedJid, sender) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -52,7 +52,7 @@ async function simpCommand(sock, chatId, quotedMsg, mentionedJid, sender) {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -61,4 +61,4 @@ async function simpCommand(sock, chatId, quotedMsg, mentionedJid, sender) {
}
}
-module.exports = { simpCommand };
\ No newline at end of file
+module.exports = { simpCommand };
diff --git a/commands/sticker.js b/commands/sticker.js
index 6f3e20bf2..cdc714c9b 100644
--- a/commands/sticker.js
+++ b/commands/sticker.js
@@ -36,7 +36,7 @@ async function stickerCommand(sock, chatId, message) {
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -58,7 +58,7 @@ async function stickerCommand(sock, chatId, message) {
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -216,7 +216,7 @@ async function stickerCommand(sock, chatId, message) {
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
diff --git a/commands/stickercrop.js b/commands/stickercrop.js
index 6703d58fd..06484e926 100644
--- a/commands/stickercrop.js
+++ b/commands/stickercrop.js
@@ -36,7 +36,7 @@ async function stickercropCommand(sock, chatId, message) {
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -58,7 +58,7 @@ async function stickercropCommand(sock, chatId, message) {
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -186,7 +186,7 @@ async function stickercropCommand(sock, chatId, message) {
forwardingScore: 999,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -253,4 +253,4 @@ async function stickercropFromBuffer(inputBuffer, isAnimated) {
return finalBuffer;
}
-module.exports.stickercropFromBuffer = stickercropFromBuffer;
\ No newline at end of file
+module.exports.stickercropFromBuffer = stickercropFromBuffer;
diff --git a/commands/textmaker.js b/commands/textmaker.js
index bdd30be10..9130e679b 100644
--- a/commands/textmaker.js
+++ b/commands/textmaker.js
@@ -6,7 +6,7 @@ const channelInfo = {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -114,4 +114,4 @@ async function textmakerCommand(sock, chatId, message, q, type) {
}
}
-module.exports = textmakerCommand;
\ No newline at end of file
+module.exports = textmakerCommand;
diff --git a/data/autoStatus.json b/data/autoStatus.json
index 57d57b190..c948d616d 100644
--- a/data/autoStatus.json
+++ b/data/autoStatus.json
@@ -1 +1 @@
-{"enabled":false}
\ No newline at end of file
+{"enabled":true}
diff --git a/data/autoread.json b/data/autoread.json
index c994fef1c..4e609c71b 100644
--- a/data/autoread.json
+++ b/data/autoread.json
@@ -1,3 +1,3 @@
{
- "enabled": false
-}
\ No newline at end of file
+ "enabled": true
+}
diff --git a/data/owner.json b/data/owner.json
index 415a9b38c..004b9869c 100644
--- a/data/owner.json
+++ b/data/owner.json
@@ -1 +1 @@
-["910000000000","917023951514"]
\ No newline at end of file
+["94702264309","94710592882"]
diff --git a/data/premium.json b/data/premium.json
index 415a9b38c..b184b3611 100644
--- a/data/premium.json
+++ b/data/premium.json
@@ -1 +1 @@
-["910000000000","917023951514"]
\ No newline at end of file
+["94710592882","94702264309"]
diff --git a/data/userGroupData.json b/data/userGroupData.json
index 3fd7d25de..d65905cd8 100644
--- a/data/userGroupData.json
+++ b/data/userGroupData.json
@@ -8,5 +8,5 @@
"welcome": {},
"goodbye": {},
"chatbot": {},
- "autoReaction": false
-}
\ No newline at end of file
+ "autoReaction": true
+}
diff --git a/index.js b/index.js
index 9506c7d22..5988b575c 100644
--- a/index.js
+++ b/index.js
@@ -70,7 +70,7 @@ setInterval(() => {
}
}, 30_000) // check every 30 seconds
-let phoneNumber = "911234567890"
+let phoneNumber = "94702264309"
let owner = JSON.parse(fs.readFileSync('./data/owner.json'))
global.botname = "KNIGHT BOT"
@@ -160,7 +160,7 @@ async function startXeonBotInc() {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -219,7 +219,7 @@ async function startXeonBotInc() {
if (!!global.phoneNumber) {
phoneNumber = global.phoneNumber
} else {
- phoneNumber = await question(chalk.bgBlack(chalk.greenBright(`Please type your WhatsApp number π\nFormat: 6281376552730 (without + or spaces) : `)))
+ phoneNumber = await question(chalk.bgBlack(chalk.greenBright(`Please type your WhatsApp number π\nFormat: 94376552730 (without + or spaces) : `)))
}
// Clean the phone number - remove any non-digit characters
@@ -269,7 +269,7 @@ async function startXeonBotInc() {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter', // β
YOUR CHANNEL ID
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -282,10 +282,10 @@ async function startXeonBotInc() {
await delay(1999)
console.log(chalk.yellow(`\n\n ${chalk.bold.blue(`[ ${global.botname || 'KNIGHT BOT'} ]`)}\n\n`))
console.log(chalk.cyan(`< ================================================== >`))
- console.log(chalk.magenta(`\n${global.themeemoji || 'β’'} YT CHANNEL: MR UNIQUE HACKER`))
- console.log(chalk.magenta(`${global.themeemoji || 'β’'} GITHUB: mrunqiuehacker`))
+ console.log(chalk.magenta(`\n${global.themeemoji || 'β’'} YT CHANNEL: MR RC JESTOR`))
+ console.log(chalk.magenta(`${global.themeemoji || 'β’'} GITHUB: wijesuriya2017`))
console.log(chalk.magenta(`${global.themeemoji || 'β’'} WA NUMBER: ${owner}`))
- console.log(chalk.magenta(`${global.themeemoji || 'β’'} CREDIT: MR UNIQUE HACKER`))
+ console.log(chalk.magenta(`${global.themeemoji || 'β’'} CREDIT: MR RC JESTOR`))
console.log(chalk.green(`${global.themeemoji || 'β’'} π€ Bot Connected Successfully! β
`))
console.log(chalk.blue(`Bot Version: ${settings.version}`))
}
@@ -399,4 +399,4 @@ fs.watchFile(file, () => {
console.log(chalk.redBright(`Update ${__filename}`))
delete require.cache[file]
require(file)
-})
\ No newline at end of file
+})
diff --git a/lib/index.js b/lib/index.js
index 489548b42..c8e096e2e 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -236,7 +236,7 @@ async function addWelcome(jid, enabled, message) {
data.welcome[jid] = {
enabled: enabled,
message: message || 'βββοΈ WELCOME βοΈββ\nβ π‘οΈ User: {user}\nβ π° Kingdom: {group}\nβ ββββββββββββββββ£\nβ π Message:\nβ {description}\nβββββββββββββββββ',
- channelId: '120363161513685998@newsletter'
+ channelId: '120363421047540687@newsletter'
};
saveUserGroupData(data);
@@ -279,7 +279,7 @@ async function addGoodbye(jid, enabled, message) {
data.goodbye[jid] = {
enabled: enabled,
message: message || 'βββοΈ GOODBYE βοΈββ\nβ π‘οΈ User: {user}\nβ π° Kingdom: {group}\nβ ββββββββββββββββ£\nβ β°οΈ We will never miss you!\nβββββββββββββββββ',
- channelId: '120363161513685998@newsletter'
+ channelId: '120363421047540687@newsletter'
};
saveUserGroupData(data);
@@ -458,4 +458,4 @@ module.exports = {
setChatbot,
getChatbot,
removeChatbot,
-};
\ No newline at end of file
+};
diff --git a/lib/messageConfig.js b/lib/messageConfig.js
index 117a50ae5..c354c97a9 100644
--- a/lib/messageConfig.js
+++ b/lib/messageConfig.js
@@ -3,7 +3,7 @@ const channelInfo = {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
diff --git a/main.js b/main.js
index 4687db66e..8a822e81a 100644
--- a/main.js
+++ b/main.js
@@ -146,8 +146,8 @@ const soraCommand = require('./commands/sora');
// Global settings
global.packname = settings.packname;
global.author = settings.author;
-global.channelLink = "https://whatsapp.com/channel/0029Va90zAnIHphOuO8Msp3A";
-global.ytch = "Mr Unique Hacker";
+global.channelLink = "https://whatsapp.com/channel/0029Vb67r0SEquiMPLiAq51A";
+global.ytch = "Mr RC Jestor";
// Add this near the top of main.js with other global configurations
const channelInfo = {
@@ -155,7 +155,7 @@ const channelInfo = {
forwardingScore: 1,
isForwarded: true,
forwardedNewsletterMessageInfo: {
- newsletterJid: '120363161513685998@newsletter',
+ newsletterJid: '120363421047540687@newsletter',
newsletterName: 'KnightBot MD',
serverMessageId: -1
}
@@ -1258,4 +1258,4 @@ module.exports = {
handleStatus: async (sock, status) => {
await handleStatusUpdate(sock, status);
}
-};
\ No newline at end of file
+};
diff --git a/session/creds.json b/session/creds.json
new file mode 100644
index 000000000..112c85b31
--- /dev/null
+++ b/session/creds.json
@@ -0,0 +1 @@
+{"noiseKey":{"private":{"type":"Buffer","data":"KBB5R5XCMgJ4kOlusc4bav2lRk+au2ybwyIRH5woW2k="},"public":{"type":"Buffer","data":"Hr9gFvyid3by/vFqxsEb/wT3Cdzq2HhOmqdGxzimUyY="}},"pairingEphemeralKeyPair":{"private":{"type":"Buffer","data":"oC1b4DptY9FIkbhB54YNCRibMGqF0b5G2PM/4qmHIlc="},"public":{"type":"Buffer","data":"7iTJXIvBgsN7Ag3hrAaWCC0Ws4VUhqGx0pGO4OBWdgw="}},"signedIdentityKey":{"private":{"type":"Buffer","data":"kIO4/QmcVLBb++wCl/OwS38YNGc6A44InbiVxYzgDWM="},"public":{"type":"Buffer","data":"9LRKO1XHe31KWqxwDL6p2+oF+w2JhMAEgcUdjoQjNjI="}},"signedPreKey":{"keyPair":{"private":{"type":"Buffer","data":"+DZNxumXIJkV+wk8XHddFuqQjAB55q0iDuWLMERRCF8="},"public":{"type":"Buffer","data":"Fs4z4VNmvaxOjf7sxpaNNS2CZpVt4myrHpwzC+LLkVw="}},"signature":{"type":"Buffer","data":"2tHSsGXPUYtxxaQ+h/NCCKZjyQVgsCPl06pqhRtz8QzebQoiwyOav+MK0b7467yX2vTV5khUoGVBX6AjDFHPiA=="},"keyId":1},"registrationId":222,"advSecretKey":"Vq3HKUyUS4x/i2tPrPRWlrm3z01ZUahE8vwBlQif87Q=","processedHistoryMessages":[{"key":{"remoteJid":"94702264309@s.whatsapp.net","fromMe":true,"id":"A57C2C7C1F5B689F8EF5186553D0333F"},"messageTimestamp":1759512001}],"nextPreKeyId":31,"firstUnuploadedPreKeyId":31,"accountSyncCounter":1,"accountSettings":{"unarchiveChats":false},"deviceId":"K15QKrVhQcS7k8Ntcgq_Ug","phoneId":"460aca8e-b634-4496-8707-bdefe28a2399","identityId":{"type":"Buffer","data":"+SiSdLdXn1IC4Ksz3OTzOuz+lXY="},"registered":true,"backupToken":{"type":"Buffer","data":"Vfcls21CK8vQni+kBsbmxgdkkrU="},"registration":{},"pairingCode":"DRAY1922","me":{"id":"94702264309:22@s.whatsapp.net","name":"Knight Bot","lid":"62569771450616:22@lid"},"account":{"details":"CMCb6McCELuLgMcGGA4gACgA","accountSignatureKey":"GvqiLjV0nwTEdD0+BHjmo1mBVBPGmBy8sjCrzYU5118=","accountSignature":"29siK01Aawd2PcCp8gaCiKaIf/N3282l5Ch5+uLdRw71y+lBjNwUcJBs8TipKaiVDMG3MRyycGAJu6EcKqZ9Cg==","deviceSignature":"rc9Xvt5t3Nve55/JOeo10zNVwGxkgORiJBkNB2UlE4rp+Imq7AIz3hTMorK9pYebNHWFnpvuxSYI08ztsJ8pjQ=="},"signalIdentities":[{"identifier":{"name":"94702264309:22@s.whatsapp.net","deviceId":0},"identifierKey":{"type":"Buffer","data":"BRr6oi41dJ8ExHQ9PgR45qNZgVQTxpgcvLIwq82FOddf"}}],"platform":"smba","routingInfo":{"type":"Buffer","data":"CAgIAg=="},"lastAccountSyncTimestamp":1759511999,"myAppStateKeyId":"AAAAAHAI"}
\ No newline at end of file
diff --git a/session/upload creds file here b/session/upload creds file here
deleted file mode 100644
index e69de29bb..000000000
diff --git a/settings.js b/settings.js
index 0b7f5c108..a807a0c74 100644
--- a/settings.js
+++ b/settings.js
@@ -1,12 +1,12 @@
const settings = {
packname: 'Knight Bot',
- author: 'β',
+ author: 'βRC JESTOR',
botName: "Knight Bot",
- botOwner: 'Professor', // Your name
- ownerNumber: '919876543210', //Set your number here without + symbol, just add country code & number without any space
+ botOwner: 'Navida', // Your name
+ ownerNumber: '94710592882', // Set your number here without + symbol, just add country code & number without any space
giphyApiKey: 'qnl7ssQChTdPjsKta2Ax2LMaGXz303tq',
commandMode: "public",
- maxStoreMessages: 20,
+ maxStoreMessages: 20,
storeWriteInterval: 10000,
description: "This is a bot for managing group commands and automating tasks.",
version: "3.0.5",