diff --git a/.gitignore b/.gitignore
index c10d8d6935..c0daa47962 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,4 +24,6 @@ scripts/cmds/assets/guide
scripts/events/tmp/*
scripts/events/data/leaveAttachment
scripts/events/data/welcomeAttachment
-!scripts/events/tmp/.gitkeep
\ No newline at end of file
+!scripts/events/tmp/.gitkeep
+
+Fca_Database
\ No newline at end of file
diff --git a/Goat.js b/Goat.js
index d48c90350a..69dbaf8adf 100644
--- a/Goat.js
+++ b/Goat.js
@@ -17,13 +17,15 @@
* Cảm ơn bạn đã sử dụng
*/
+/*
+* original author : @ntkhang03
+* refactor for nexus-fca, cleaned garbage and simplified by : @tas33n
+*/
+
process.on('unhandledRejection', error => console.log(error));
process.on('uncaughtException', error => console.log(error));
-const axios = require("axios");
const fs = require("fs-extra");
-const google = require("googleapis").google;
-const nodemailer = require("nodemailer");
const { execSync } = require('child_process');
const log = require('./logger/log.js');
const path = require("path");
@@ -217,86 +219,6 @@ if (config.autoRestart) {
}
(async () => {
- // ———————————————— SETUP MAIL ———————————————— //
- const { gmailAccount } = config.credentials;
- const { email, clientId, clientSecret, refreshToken } = gmailAccount;
- const OAuth2 = google.auth.OAuth2;
- const OAuth2_client = new OAuth2(clientId, clientSecret);
- OAuth2_client.setCredentials({ refresh_token: refreshToken });
- let accessToken;
- try {
- accessToken = await OAuth2_client.getAccessToken();
- }
- catch (err) {
- throw new Error(getText("Goat", "googleApiTokenExpired"));
- }
- const transporter = nodemailer.createTransport({
- host: 'smtp.gmail.com',
- service: 'Gmail',
- auth: {
- type: 'OAuth2',
- user: email,
- clientId,
- clientSecret,
- refreshToken,
- accessToken
- }
- });
-
- async function sendMail({ to, subject, text, html, attachments }) {
- const transporter = nodemailer.createTransport({
- host: 'smtp.gmail.com',
- service: 'Gmail',
- auth: {
- type: 'OAuth2',
- user: email,
- clientId,
- clientSecret,
- refreshToken,
- accessToken
- }
- });
- const mailOptions = {
- from: email,
- to,
- subject,
- text,
- html,
- attachments
- };
- const info = await transporter.sendMail(mailOptions);
- return info;
- }
-
- global.utils.sendMail = sendMail;
- global.utils.transporter = transporter;
-
- // ———————————————— CHECK VERSION ———————————————— //
- const { data: { version } } = await axios.get("https://raw.githubusercontent.com/ntkhang03/Goat-Bot-V2/main/package.json");
- const currentVersion = require("./package.json").version;
- if (compareVersion(version, currentVersion) === 1)
- utils.log.master("NEW VERSION", getText(
- "Goat",
- "newVersionDetected",
- colors.gray(currentVersion),
- colors.hex("#eb6a07", version),
- colors.hex("#eb6a07", "node update")
- ));
- // —————————— CHECK FOLDER GOOGLE DRIVE —————————— //
- const parentIdGoogleDrive = await utils.drive.checkAndCreateParentFolder("GoatBot");
- utils.drive.parentID = parentIdGoogleDrive;
- // ———————————————————— LOGIN ———————————————————— //
+ // ———————————————— START BOT INTANCE ———————————————— //
require(`./bot/login/login${NODE_ENV === 'development' ? '.dev.js' : '.js'}`);
-})();
-
-function compareVersion(version1, version2) {
- const v1 = version1.split(".");
- const v2 = version2.split(".");
- for (let i = 0; i < 3; i++) {
- if (parseInt(v1[i]) > parseInt(v2[i]))
- return 1; // version1 > version2
- if (parseInt(v1[i]) < parseInt(v2[i]))
- return -1; // version1 < version2
- }
- return 0; // version1 = version2
-}
+})();
\ No newline at end of file
diff --git a/README.md b/README.md
index 4ddff0581c..ec571b65a6 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,63 @@
+
+## 🦾 Fork Version: What’s Different?
+
+This fork is a lightweight, modernized version of Goat-Bot-V2:
+
+- Removed all verification, Google APIs, and dashboard features—only `/uptime` API remains.
+- Uses [nexus-fca](https://github.com/tas33n/nexus-fca) for Facebook integration.
+- Cleaned up config files and dependencies for simplicity.
+- Codebase is easier to read and extend.
+
+---
+
+## 🚀 Running the Bot
+
+You only need to provide **login info** — either via a **cookie file** or **email/password** — and you’re good to go.
+
+### 1. Clone & Install
+
+```bash
+git clone https://github.com/tas33n/Goat-Bot-V2.git
+cd Goat-Bot-V2
+npm install
+```
+
+### 2. Choose your login method
+
+#### 🔑 Option A: Using `cookiex.txt`
+
+* Place your **Facebook cookies or appstate** inside a file named `account.txt` at the root of the project.
+* The bot will automatically load it.
+
+#### 📧 Option B: Using `config.json`
+
+Edit the `config.json` file and fill in your Facebook account info:
+
+```json
+{
+ "facebookAccount": {
+ "email": "your_fb_email",
+ "password": "your_fb_password",
+ "twofactor": "123456",
+ ...
+ }
+}
+```
+
+* `email` + `password` are required.
+* `twofactor` is optional — add if your account has 2FA enabled.
+
+### 3. Start the bot
+
+```bash
+npm start
+```
+
+That’s it 🎉 The bot should now be running.
+
+---
+unquote readme
+---
Goat Bot - Bot Chat Messenger