Jonell01 commited on
Commit
08bfcbf
·
verified ·
1 Parent(s): 9207fb5

Upload 20 files

Browse files
Files changed (20) hide show
  1. .breakpoints +12 -0
  2. .gitignore +130 -0
  3. .replit +81 -0
  4. appstate.json +123 -0
  5. config.json +94 -0
  6. custom.js +104 -0
  7. downloadedImage.jpg +0 -0
  8. fb_dtsg_data.json +6 -0
  9. gpt.txt +0 -0
  10. harold.html +119 -0
  11. index.js +126 -0
  12. main.js +435 -0
  13. monitor.jsh +149 -0
  14. package-lock.json +0 -0
  15. package.json +118 -0
  16. pass.json +5 -0
  17. proxy.json +3 -0
  18. replit.nix +6 -0
  19. replit_zip_error_log.txt +4 -0
  20. user-agent.json +3 -0
.breakpoints ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "files": {
3
+ "index.js": [
4
+ {
5
+ "id": "bc3a8ff0-c242-4e64-8eed-249a5edae4c2",
6
+ "line": 2,
7
+ "version": 65,
8
+ "index": 44
9
+ }
10
+ ]
11
+ }
12
+ }
.gitignore ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ lerna-debug.log*
8
+ .pnpm-debug.log*
9
+
10
+ # Diagnostic reports (https://nodejs.org/api/report.html)
11
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12
+
13
+ # Runtime data
14
+ pids
15
+ *.pid
16
+ *.seed
17
+ *.pid.lock
18
+
19
+ # Directory for instrumented libs generated by jscoverage/JSCover
20
+ lib-cov
21
+
22
+ # Coverage directory used by tools like istanbul
23
+ coverage
24
+ *.lcov
25
+
26
+ # nyc test coverage
27
+ .nyc_output
28
+
29
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30
+ .grunt
31
+
32
+ # Bower dependency directory (https://bower.io/)
33
+ bower_components
34
+
35
+ # node-waf configuration
36
+ .lock-wscript
37
+
38
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
39
+ build/Release
40
+
41
+ # Dependency directories
42
+ node_modules/
43
+ jspm_packages/
44
+
45
+ # Snowpack dependency directory (https://snowpack.dev/)
46
+ web_modules/
47
+
48
+ # TypeScript cache
49
+ *.tsbuildinfo
50
+
51
+ # Optional npm cache directory
52
+ .npm
53
+
54
+ # Optional eslint cache
55
+ .eslintcache
56
+
57
+ # Optional stylelint cache
58
+ .stylelintcache
59
+
60
+ # Microbundle cache
61
+ .rpt2_cache/
62
+ .rts2_cache_cjs/
63
+ .rts2_cache_es/
64
+ .rts2_cache_umd/
65
+
66
+ # Optional REPL history
67
+ .node_repl_history
68
+
69
+ # Output of 'npm pack'
70
+ *.tgz
71
+
72
+ # Yarn Integrity file
73
+ .yarn-integrity
74
+
75
+ # dotenv environment variable files
76
+ .env
77
+ .env.development.local
78
+ .env.test.local
79
+ .env.production.local
80
+ .env.local
81
+
82
+ # parcel-bundler cache (https://parceljs.org/)
83
+ .cache
84
+ .parcel-cache
85
+
86
+ # Next.js build output
87
+ .next
88
+ out
89
+
90
+ # Nuxt.js build / generate output
91
+ .nuxt
92
+ dist
93
+
94
+ # Gatsby files
95
+ .cache/
96
+ # Comment in the public line in if your project uses Gatsby and not Next.js
97
+ # https://nextjs.org/blog/next-9-1#public-directory-support
98
+ # public
99
+
100
+ # vuepress build output
101
+ .vuepress/dist
102
+
103
+ # vuepress v2.x temp and cache directory
104
+ .temp
105
+ .cache
106
+
107
+ # Docusaurus cache and generated files
108
+ .docusaurus
109
+
110
+ # Serverless directories
111
+ .serverless/
112
+
113
+ # FuseBox cache
114
+ .fusebox/
115
+
116
+ # DynamoDB Local files
117
+ .dynamodb/
118
+
119
+ # TernJS port file
120
+ .tern-port
121
+
122
+ # Stores VSCode versions used for testing VSCode extensions
123
+ .vscode-test
124
+
125
+ # yarn v2
126
+ .yarn/cache
127
+ .yarn/unplugged
128
+ .yarn/build-state.yml
129
+ .yarn/install-state.gz
130
+ .pnp.*
.replit ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ entrypoint = "index.js"
2
+ modules = ["nodejs-20"]
3
+ hidden = [".config", "package-lock.json"]
4
+
5
+ [gitHubImport]
6
+ requiredFiles = [".replit", "replit.nix", "package.json", "package-lock.json"]
7
+
8
+ [nix]
9
+ channel = "stable-24_05"
10
+
11
+ [unitTest]
12
+ language = "nodejs"
13
+
14
+ [deployment]
15
+ run = ["node", "monitor.js"]
16
+ deploymentTarget = "cloudrun"
17
+ ignorePorts = false
18
+
19
+ [[ports]]
20
+ localPort = 3000
21
+ externalPort = 3000
22
+
23
+ [[ports]]
24
+ localPort = 25588
25
+ externalPort = 80
26
+
27
+ [[ports]]
28
+ localPort = 33049
29
+ externalPort = 8008
30
+
31
+ [[ports]]
32
+ localPort = 33803
33
+ externalPort = 5173
34
+
35
+ [[ports]]
36
+ localPort = 36019
37
+ externalPort = 8081
38
+
39
+ [[ports]]
40
+ localPort = 36801
41
+ externalPort = 3001
42
+
43
+ [[ports]]
44
+ localPort = 38211
45
+ externalPort = 8000
46
+
47
+ [[ports]]
48
+ localPort = 38477
49
+ externalPort = 3003
50
+
51
+ [[ports]]
52
+ localPort = 39799
53
+ externalPort = 4200
54
+
55
+ [[ports]]
56
+ localPort = 39953
57
+ externalPort = 6000
58
+
59
+ [[ports]]
60
+ localPort = 40617
61
+ externalPort = 5000
62
+
63
+ [[ports]]
64
+ localPort = 40639
65
+ externalPort = 8099
66
+
67
+ [[ports]]
68
+ localPort = 41203
69
+ externalPort = 8080
70
+
71
+ [[ports]]
72
+ localPort = 41507
73
+ externalPort = 9000
74
+
75
+ [[ports]]
76
+ localPort = 44577
77
+ externalPort = 6800
78
+
79
+ [[ports]]
80
+ localPort = 45075
81
+ externalPort = 3002
appstate.json ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "key": "ps_l",
4
+ "value": "1",
5
+ "domain": "facebook.com",
6
+ "path": "/",
7
+ "hostOnly": false,
8
+ "creation": "2025-03-18T13:14:41.064Z",
9
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
10
+ },
11
+ {
12
+ "key": "datr",
13
+ "value": "bZPXZ72xBHXJ4vHMw4Vhv57w",
14
+ "domain": "facebook.com",
15
+ "path": "/",
16
+ "hostOnly": false,
17
+ "creation": "2025-03-18T13:14:41.068Z",
18
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
19
+ },
20
+ {
21
+ "key": "fr",
22
+ "value": "17HQE5eP15RJhHr9P.AWX7Hgviy-lTs-T97Shl3jFcREJif1lidOscVQ.Bn2U8V..AAA.0.0.Bn2XHB.AWWq4Caec4s",
23
+ "expires": "2025-06-16T13:14:41.000Z",
24
+ "maxAge": 7776000,
25
+ "domain": "facebook.com",
26
+ "path": "/",
27
+ "secure": true,
28
+ "httpOnly": true,
29
+ "hostOnly": false,
30
+ "creation": "2025-03-18T13:14:41.071Z",
31
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
32
+ },
33
+ {
34
+ "key": "vpd",
35
+ "value": "v1%3B630x360x1.7993053197860718",
36
+ "domain": "facebook.com",
37
+ "path": "/",
38
+ "hostOnly": false,
39
+ "creation": "2025-03-18T13:14:41.075Z",
40
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
41
+ },
42
+ {
43
+ "key": "xs",
44
+ "value": "35%3AaujT9rFdaPkQCw%3A2%3A1742297483%3A-1%3A-1",
45
+ "domain": "facebook.com",
46
+ "path": "/",
47
+ "hostOnly": false,
48
+ "creation": "2025-03-18T13:14:41.077Z",
49
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
50
+ },
51
+ {
52
+ "key": "locale",
53
+ "value": "en_US",
54
+ "domain": "facebook.com",
55
+ "path": "/",
56
+ "hostOnly": false,
57
+ "creation": "2025-03-18T13:14:41.078Z",
58
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
59
+ },
60
+ {
61
+ "key": "m_pixel_ratio",
62
+ "value": "1.7993053197860718",
63
+ "domain": "facebook.com",
64
+ "path": "/",
65
+ "hostOnly": false,
66
+ "creation": "2025-03-18T13:14:41.079Z",
67
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
68
+ },
69
+ {
70
+ "key": "c_user",
71
+ "value": "61573875617360",
72
+ "domain": "facebook.com",
73
+ "path": "/",
74
+ "hostOnly": false,
75
+ "creation": "2025-03-18T13:14:41.081Z",
76
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
77
+ },
78
+ {
79
+ "key": "dpr",
80
+ "value": "1.7993053197860718",
81
+ "domain": "facebook.com",
82
+ "path": "/",
83
+ "hostOnly": false,
84
+ "creation": "2025-03-18T13:14:41.082Z",
85
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
86
+ },
87
+ {
88
+ "key": "ps_n",
89
+ "value": "1",
90
+ "domain": "facebook.com",
91
+ "path": "/",
92
+ "hostOnly": false,
93
+ "creation": "2025-03-18T13:14:41.084Z",
94
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
95
+ },
96
+ {
97
+ "key": "sb",
98
+ "value": "eJPXZ9XUdmmx6BVmh5X_Vdfk",
99
+ "domain": "facebook.com",
100
+ "path": "/",
101
+ "hostOnly": false,
102
+ "creation": "2025-03-18T13:14:41.085Z",
103
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
104
+ },
105
+ {
106
+ "key": "wd",
107
+ "value": "400x700",
108
+ "domain": "facebook.com",
109
+ "path": "/",
110
+ "hostOnly": false,
111
+ "creation": "2025-03-18T13:14:41.085Z",
112
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
113
+ },
114
+ {
115
+ "key": "wl_cbv",
116
+ "value": "v2%3Bclient_version%3A2764%3Btimestamp%3A1742297168",
117
+ "domain": "facebook.com",
118
+ "path": "/",
119
+ "hostOnly": false,
120
+ "creation": "2025-03-18T13:14:41.086Z",
121
+ "lastAccessed": "2025-03-18T13:14:45.174Z"
122
+ }
123
+ ]
config.json ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "1.7.6",
3
+ "language": "en",
4
+ "useEnvForCredentials": false,
5
+ "envGuide": "When useEnvForCredentials enabled, it will use the process.env key provided for email and password, which helps hide your credentials, you can find env in render's environment tab, you can also find it in replit secrets.",
6
+ "DeveloperMode": true,
7
+ "autoCreateDB": false,
8
+ "allowInbox": false,
9
+ "autoClean": true,
10
+ "adminOnly": false,
11
+ "autoCensor": true,
12
+ "encryptSt": false,
13
+ "removeSt": false,
14
+ "UPDATE": {
15
+ "Package": true,
16
+ "EXCLUDED": [
17
+ "chalk",
18
+ "mqtt",
19
+ "https-proxy-agent"
20
+ ],
21
+ "Info": "This section manages the bot's automatic package updates. To disable this function, set 'Package' to false. If you only want to exclude specific packages, set them to true and add them in the 'EXCLUDED' list."
22
+ },
23
+ "commandDisabled": [
24
+ "gptauto.js",
25
+ "gtpgo.js",
26
+ "resend.js"
27
+ ],
28
+ "eventDisabled": [],
29
+ "FCA": "ws3-fca",
30
+ "OWNER": "Jonell Magallanes",
31
+ "BOTNAME": "CC PROJECTS",
32
+ "PREFIX": "?",
33
+ "ADMINBOT": [
34
+ "100036956043695",
35
+ ""
36
+ ],
37
+ "DESIGN": {
38
+ "Title": "CC PROJECT",
39
+ "Theme": "BLUE",
40
+ "Admin": "Jonell Magallanes",
41
+ "Setup": {
42
+ "Info": "Design your own custom terminal Titlebar for the title and must contain no numbers",
43
+ "Theme": "Customize your console effortlessly with various theme colors. Explore Aqua, Fiery, Blue, Orange, Pink, Red, Retro, Sunlight, Teen, Summer, Flower, Ghost, Purple, Rainbow, and Hacker themes to enhance your terminal logs."
44
+ }
45
+ },
46
+ "APPSTATEPATH": "appstate.json",
47
+ "DEL_FUNCTION": false,
48
+ "ADD_FUNCTION": true,
49
+ "FCAOption": {
50
+ "forceLogin": true,
51
+ "listenEvents": true,
52
+ "autoMarkDelivery": false,
53
+ "autoMarkRead": false,
54
+ "logLevel": "error",
55
+ "selfListen": false,
56
+ "online": true,
57
+ "userAgent": "Mozilla/5.0 (Linux; Android 10; Mobile; rv:89.0) Gecko/89.0 Firefox/89.0"
58
+ },
59
+ "daily": {
60
+ "cooldownTime": 43200000,
61
+ "rewardCoin": 500
62
+ },
63
+ "work": {
64
+ "cooldownTime": 1200000
65
+ },
66
+ "help": {
67
+ "autoUnsend": true,
68
+ "delayUnsend": 60
69
+ },
70
+ "adminUpdate": {
71
+ "autoUnsend": true,
72
+ "sendNoti": true,
73
+ "timeToUnsend": 10
74
+ },
75
+ "adminNoti": {
76
+ "autoUnsend": true,
77
+ "sendNoti": true,
78
+ "timeToUnsend": 10
79
+ },
80
+ "sing": {
81
+ "YOUTUBE_API": "AIzaSyCqox-KXEwDncsuo2HIpE0MF8J7ATln5Vc",
82
+ "SOUNDCLOUD_API": "M4TSyS6eV0AcMynXkA3qQASGcOFQTWub"
83
+ },
84
+ "video": {
85
+ "YOUTUBE_API": "AIzaSyDEE1-zZSRVI8lTaQOVsIAQFgL-_BJKvhk"
86
+ },
87
+ "audio": {
88
+ "YOUTUBE_API": "AIzaSyDEE1-zZSRVI8lTaQOVsIAQFgL-_BJKvhk"
89
+ },
90
+ "menu": {
91
+ "autoUnsend": true,
92
+ "delayUnsend": 60
93
+ }
94
+ }
custom.js ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const cron = require('node-cron');
2
+ const axios = require("axios");
3
+
4
+ const fetchWeather = async () => {
5
+ try {
6
+ const response = await axios.get('https://ccexplorerapisjonell.vercel.app/api/weather');
7
+ const { synopsis, issuedAt, temperature, humidity } = response.data;
8
+ return `Weather Update:\n\n${synopsis}\n\nIssued at: ${issuedAt}\nMax Temperature: ${temperature.max.value} at ${temperature.max.time}\nMin Temperature: ${temperature.min.value} at ${temperature.min.time}\nMax Humidity: ${humidity.max.value} at ${humidity.max.time}\nMin Humidity: ${humidity.min.value} at ${humidity.min.time}`;
9
+ } catch (error) {
10
+ return 'Unable to fetch weather information at the moment.';
11
+ }
12
+ };
13
+
14
+ module.exports = async ({ api }) => {
15
+ const config = {
16
+ autoRestart: {
17
+ status: false,
18
+ time: 10,
19
+ note: 'To avoid problems, enable periodic bot restarts',
20
+ },
21
+ greetings: [
22
+ {
23
+ cronTime: '0 5 * * *',
24
+ messages: [`Good morning! Have a great day ahead!`],
25
+ },
26
+ {
27
+ cronTime: '0 8 * * *',
28
+ messages: [`Hello Everyone Time Check 8:00 AM :>`],
29
+ },
30
+ {
31
+ cronTime: '0 10 * * *',
32
+ messages: [`Hello everyone! How's your day going?`],
33
+ },
34
+ {
35
+ cronTime: '0 12 * * *',
36
+ messages: [`Lunchtime reminder: Take a break and eat well!`],
37
+ },
38
+ {
39
+ cronTime: '0 14 * * *',
40
+ messages: [`Reminder: Don't forget your tasks for today!`],
41
+ },
42
+ {
43
+ cronTime: '0 18 * * *',
44
+ messages: [`Good evening! Relax and enjoy your evening.`],
45
+ },
46
+ {
47
+ cronTime: '0 20 * * *',
48
+ messages: [`Time to wind down. Have a peaceful evening.`],
49
+ },
50
+ {
51
+ cronTime: '0 22 * * *',
52
+ messages: [`Good night! Have a restful sleep.`],
53
+ },
54
+ {
55
+ cronTime: '0 7 * * *',
56
+ messages: async () => `Good morning! Have a great day ahead!\n\n${await fetchWeather()}`,
57
+ },
58
+ {
59
+ cronTime: '0 19 * * *',
60
+ messages: async () => `Good evening! Relax and enjoy your evening.\n\n${await fetchWeather()}`,
61
+ }
62
+ ]
63
+ };
64
+
65
+ config.greetings.forEach((greeting) => {
66
+ cron.schedule(greeting.cronTime, async () => {
67
+ const message = typeof greeting.messages[0] === 'function' ? await greeting.messages[0]() : greeting.messages[0];
68
+ api.getThreadList(20, null, ['INBOX']).then((list) => {
69
+ list.forEach((thread) => {
70
+ if (thread.isGroup) {
71
+ api.sendMessage(message, thread.threadID).catch((error) => {
72
+ console.log(`Error sending message: ${error}`, 'AutoGreet');
73
+ });
74
+ }
75
+ });
76
+ }).catch((error) => {
77
+ console.log(`Error getting thread list: ${error}`, 'AutoGreet');
78
+ });
79
+ }, {
80
+ scheduled: true,
81
+ timezone: "Asia/Manila"
82
+ });
83
+ });
84
+
85
+ if (config.autoRestart.status) {
86
+ cron.schedule(`*/${config.autoRestart.time} * * * *`, () => {
87
+ api.getThreadList(20, null, ['INBOX']).then((list) => {
88
+ list.forEach((thread) => {
89
+ if (thread.isGroup) {
90
+ api.sendMessage("🔃 𝗥𝗲𝘀𝘁𝗮𝗿𝘁𝗶𝗻𝗴 𝗽𝗿𝗼𝗰𝗲𝘀𝘀\n━━━━━━━━━━━━━━━━━━\nBot is restarting...", thread.threadID).then(() => {
91
+ console.log(`Restart message sent to thread`, 'Auto Restart');
92
+ }).catch((error) => {
93
+ console.log(`Error sending restart message to thread ${error}`, 'Auto Restart');
94
+ });
95
+ }
96
+ });
97
+ console.log('Start rebooting the system!', 'Auto Restart');
98
+ process.exit(1);
99
+ }).catch((error) => {
100
+ console.log(`Error getting thread list for restart: ${error}`, 'Auto Restart');
101
+ });
102
+ });
103
+ }
104
+ };
downloadedImage.jpg ADDED
fb_dtsg_data.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "61573875617360": {
3
+ "fb_dtsg": "NAcPE7VaVjQOjCUo4liybDiK_SnkpRbJpEBxyYvaXC6DD7c6_Ctr43g:35:1742297483",
4
+ "jazoest": "25533"
5
+ }
6
+ }
gpt.txt ADDED
File without changes
harold.html ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Bot Dashboard</title>
7
+ <style>
8
+ body {
9
+ font-family: "Helvetica Neue", Arial, sans-serif;
10
+ background-color: #D3F2C2;
11
+ }
12
+
13
+ .navbar {
14
+ background-color: #34A853;
15
+ color: white;
16
+ padding: 12px 30px;
17
+ display: flex;
18
+ justify-content: space-between;
19
+ align-items: center;
20
+ }
21
+
22
+ .navbar h1 {
23
+ margin: 0;
24
+ font-size: 28px;
25
+ }
26
+
27
+ .dashboard {
28
+ background-color: white;
29
+ margin: 2em auto;
30
+ padding: 2em;
31
+ border-radius: 10px;
32
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
33
+ width: 90%;
34
+ max-width: 600px;
35
+ }
36
+
37
+ .dashboard h2 {
38
+ color: #333;
39
+ margin-bottom: 15px;
40
+ }
41
+
42
+ .dashboard .stat {
43
+ padding: 20px;
44
+ background-color: #edf4ed;
45
+ margin-bottom: 20px;
46
+ border-radius: 10px;
47
+ }
48
+
49
+ .dashboard .stat:last-child {
50
+ margin-bottom: 0;
51
+ }
52
+
53
+ button {
54
+ background-color: #34A853;
55
+ color: white;
56
+ border: none;
57
+ padding: 12px 25px;
58
+ margin: 10px 0;
59
+ cursor: pointer;
60
+ font-size: 16px;
61
+ border-radius: 20px;
62
+ }
63
+
64
+ button:hover {
65
+ background-color: #2C7A4B;
66
+ }
67
+ </style>
68
+ <script
69
+ src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.0/socket.io.min.js"></script>
70
+ <script>
71
+ document.addEventListener('DOMContentLoaded', function() {
72
+ const socket = io();
73
+
74
+ fetch('/dashboard')
75
+ .then(response => response.json())
76
+ .then(data => {
77
+ document.getElementById('bot-name').textContent = data.botName;
78
+ document.getElementById('fca').textContent = data.fca;
79
+ document.getElementById('bot-uid').textContent = data.botUid;
80
+ document.getElementById('owner-name').textContent = data.ownerName;
81
+ document.getElementById('bot-prefix').textContent = data.prefix;
82
+ document.getElementById('commands-count').textContent = data.commandsCount;
83
+ document.getElementById('events-count').textContent = data.eventsCount;
84
+ document.getElementById('bot-uptime').textContent = new Date(data.uptime).toISOString().substr(11, 8);
85
+ })
86
+ .catch(error => console.error('Error fetching dashboard data:', error));
87
+
88
+ socket.on('real-time-data', data => {
89
+ document.getElementById('bot-uptime').textContent = new Date(data.uptime).toISOString().substr(11, 8);
90
+ });
91
+ });
92
+ </script>
93
+ </head>
94
+ <body>
95
+ <div class="navbar">
96
+ <h1>Bot Dashboard</h1>
97
+ </div>
98
+ <div class="dashboard">
99
+ <div class="stat">
100
+ <h2>Bot Information</h2>
101
+ Name: <span id="bot-name">Loading...</span><br>
102
+ UID: <span id="bot-uid">Loading...</span><br>
103
+ Owner: <span id="owner-name">Loading...</span><br>
104
+ Prefix: <span id="bot-prefix">Loading...</span><br>
105
+ FCA Module: <span id="fca">Loading....</span>
106
+ </div>
107
+ <div class="stat">
108
+ <h2>Statistics</h2>
109
+ Commands Count: <span id="commands-count">Loading...</span><br>
110
+ Events Count: <span id="events-count">Loading...</span>
111
+ </div>
112
+ <div class="stat">
113
+ <h2>Status</h2>
114
+ Uptime: <span id="bot-uptime">Loading...</span>
115
+ </div>
116
+ <button onclick="location.href='/dashboard/refresh'">Refresh</button>
117
+ </div>
118
+ </body>
119
+ </html>
index.js ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const { spawn } = require("child_process");
2
+ const express = require("express");
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+ const WebSocket = require("ws");
6
+
7
+ const app = express();
8
+ const port = 25689;
9
+ const appstatePath = "appstate.json";
10
+ const passcodePath = "pass.json";
11
+
12
+ let childProcess;
13
+ const clients = new Set();
14
+ const automaticRestart = true;
15
+
16
+ app.use(express.static("public"));
17
+ app.use(express.json());
18
+
19
+ app.get("/dashboard", (req, res) => {
20
+ res.sendFile(path.join(__dirname, "public", "dashboard.html"));
21
+ });
22
+
23
+ app.post("/update-appstate", (req, res) => {
24
+ const { passcode, jsonData } = req.body;
25
+
26
+ if (!isValidPasscode(passcode)) {
27
+ return res.status(401).send("Wrong passcode");
28
+ }
29
+
30
+ fs.writeFile(appstatePath, JSON.stringify(jsonData, null, 2), (err) => {
31
+ if (err) {
32
+ return res.status(500).send("Failed to update appstate.json");
33
+ }
34
+ restartBot();
35
+ res.send("Successfully restarted.");
36
+ });
37
+ });
38
+
39
+ app.get("/restart", (req, res) => {
40
+ const passcode = req.query.passcode;
41
+
42
+ if (!isValidPasscode(passcode)) {
43
+ return res.status(401).send("Wrong passcode");
44
+ }
45
+
46
+ restartBot();
47
+ res.send("Successfully restarted.");
48
+ });
49
+
50
+ app.post("/execute-command", (req, res) => {
51
+ const { passcode, command } = req.body;
52
+
53
+ if (!isValidPasscode(passcode)) {
54
+ return res.status(401).send("Wrong passcode");
55
+ }
56
+
57
+ if (!command) {
58
+ return res.status(400).send("Command is required.");
59
+ }
60
+
61
+ const execProcess = spawn(command, { shell: true, stdio: 'pipe' });
62
+
63
+ let output = '';
64
+ execProcess.stdout.on('data', (data) => {
65
+ output += data.toString();
66
+ });
67
+
68
+ execProcess.stderr.on('data', (data) => {
69
+ output += data.toString();
70
+ });
71
+
72
+ execProcess.on('close', (code) => {
73
+ if (code === 0) {
74
+ res.send(`Command executed successfully: ${output}`);
75
+ } else {
76
+ res.status(500).send(`Command execution failed with exit code ${code}: ${output}`);
77
+ }
78
+ });
79
+ });
80
+
81
+ app.get("/ping", (req, res) => {
82
+ res.json({ ping: Math.floor(Math.random() * 100) + 10 });
83
+ });
84
+
85
+ function restartBot() {
86
+ if (childProcess) {
87
+ childProcess.kill();
88
+ }
89
+
90
+ childProcess = spawn("node", ["--trace-warnings", "--async-stack-traces", "main.js"], {
91
+ cwd: __dirname,
92
+ stdio: "inherit",
93
+ shell: true
94
+ });
95
+
96
+ childProcess.on("close", (codeExit) => {
97
+ console.log(`Bot process exited with code: ${codeExit}`);
98
+ if (automaticRestart && (codeExit === 0 || codeExit === 1)) {
99
+ console.log("Restarting bot...");
100
+ restartBot();
101
+ }
102
+ });
103
+ }
104
+
105
+ function isValidPasscode(inputPasscode) {
106
+ try {
107
+ const passData = JSON.parse(fs.readFileSync(passcodePath, "utf8"));
108
+ return inputPasscode === passData.passcode;
109
+ } catch {
110
+ return false;
111
+ }
112
+ }
113
+
114
+ const server = app.listen(port, () => {
115
+ console.log(`API running at http://localhost:${port}`);
116
+ restartBot();
117
+ });
118
+
119
+ const wss = new WebSocket.Server({ server });
120
+
121
+ wss.on("connection", (ws) => {
122
+ clients.add(ws);
123
+ ws.on("close", () => {
124
+ clients.delete(ws);
125
+ });
126
+ });
main.js ADDED
@@ -0,0 +1,435 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const { readdirSync, readFileSync, writeFileSync } = require("fs-extra");
2
+ const { join, resolve } = require('path')
3
+ const { execSync } = require('child_process');
4
+ const config = require("./config.json");
5
+ const listPackage = JSON.parse(readFileSync('./package.json')).dependencies;
6
+ const fs = require("fs");
7
+ const login = require(config.FCA)
8
+ const userAgentData = JSON.parse(fs.readFileSync('user-agent.json', 'utf8'));
9
+ //const proxyip = JSON.parse(fs.readFileSync('proxy.json', 'utf8'));
10
+ //const login = require('./Meta-Horizon');
11
+ const moment = require("moment-timezone");
12
+ const logger = require("./utils/log.js");
13
+ const chalk = require("chalk");
14
+ const { spawn } = require("child_process");
15
+ const pkg = require('./package.json');
16
+ //*const fca = JSON.parse(fs.readFileSync("fca.json", "utf8"));
17
+ console.log(chalk.bold.dim(` ${process.env.REPL_SLUG}`.toUpperCase() + `(v${pkg.version})`));
18
+ logger.log(`Getting Started!`, "STARTER");
19
+
20
+ global.utils = require("./utils");
21
+ global.loading = require("./utils/log.js");
22
+ global.nodemodule = new Object();
23
+ global.config = new Object();
24
+ global.configModule = new Object();
25
+ global.moduleData = new Array();
26
+ global.language = new Object();
27
+ global.account = new Object();
28
+
29
+ /*function startProject() {
30
+ try {
31
+ const child = spawn("node", ["--trace-warnings", "--async-stack-traces", "index.js"], {
32
+ cwd: __dirname,
33
+ stdio: "inherit",
34
+ shell: true
35
+ });
36
+
37
+ child.on("close", (codeExit) => {
38
+ if (codeExit !== 0) {
39
+ startProject();
40
+ }
41
+ });
42
+
43
+ child.on("error", (error) => {
44
+ console.log(chalk.yellow(``), `An error occurred while starting the child process: ${error}`);
45
+ });
46
+ } catch (error) {
47
+ console.error("An error occurred:", error);
48
+ }
49
+ }
50
+
51
+ startProject();
52
+ */
53
+ global.client = new Object({
54
+ commands: new Map(),
55
+ events: new Map(),
56
+ cooldowns: new Map(),
57
+ eventRegistered: new Array(),
58
+ handleSchedule: new Array(),
59
+ handleReaction: new Array(),
60
+ handleReply: new Array(),
61
+ mainPath: process.cwd(),
62
+ configPath: new String(),
63
+ getTime: function(option) {
64
+ switch (option) {
65
+ case "seconds":
66
+ return `${moment.tz("Asia/Manila").format("ss")}`;
67
+ case "minutes":
68
+ return `${moment.tz("Asia/Manila").format("mm")}`;
69
+ case "hours":
70
+ return `${moment.tz("Asia/Manila").format("HH")}`;
71
+ case "date":
72
+ return `${moment.tz("Asia/Manila").format("DD")}`;
73
+ case "month":
74
+ return `${moment.tz("Asia/Manila").format("MM")}`;
75
+ case "year":
76
+ return `${moment.tz("Asia/Manila").format("YYYY")}`;
77
+ case "fullHour":
78
+ return `${moment.tz("Asia/Manila").format("HH:mm:ss")}`;
79
+ case "fullYear":
80
+ return `${moment.tz("Asia/Manila").format("DD/MM/YYYY")}`;
81
+ case "fullTime":
82
+ return `${moment.tz("Asia/Manila").format("HH:mm:ss DD/MM/YYYY")}`;
83
+ }
84
+ },
85
+ timeStart: Date.now()
86
+ });
87
+
88
+ global.data = new Object({
89
+ threadInfo: new Map(),
90
+ threadData: new Map(),
91
+ userName: new Map(),
92
+ userBanned: new Map(),
93
+ threadBanned: new Map(),
94
+ commandBanned: new Map(),
95
+ threadAllowNSFW: new Array(),
96
+ allUserID: new Array(),
97
+ allCurrenciesID: new Array(),
98
+ allThreadID: new Array()
99
+ });
100
+
101
+ // ────────────────── //
102
+ // -- LOAD THEMES -- //
103
+ const { getThemeColors } = require("./utils/log");
104
+ const { cra, cv, cb } = getThemeColors();
105
+ // ────────────────── //
106
+
107
+ const errorMessages = [];
108
+ if (errorMessages.length > 0) {
109
+ console.log("Commands with errors:");
110
+ errorMessages.forEach(({ command, error }) => {
111
+ console.log(`${command}: ${error}`);
112
+ });
113
+ }
114
+ // ────────────────── //
115
+ var configValue;
116
+ try {
117
+ global.client.configPath = join(global.client.mainPath, "config.json");
118
+ configValue = require(global.client.configPath);
119
+ logger.loader("Found config.json file!");
120
+ } catch (e) {
121
+ return logger.loader('"config.json" file not found."', "error");
122
+ }
123
+
124
+ try {
125
+ for (const key in configValue) global.config[key] = configValue[key];
126
+ logger.loader("Config Loaded!");
127
+ } catch (e) {
128
+ return logger.loader("Can't load file config!", "error")
129
+ }
130
+
131
+ for (const property in listPackage) {
132
+ try {
133
+ global.nodemodule[property] = require(property)
134
+ } catch (e) { }
135
+ }
136
+ const langFile = (readFileSync(`${__dirname}/languages/${global.config.language || "en"}.lang`, {
137
+ encoding: 'utf-8'
138
+ })).split(/\r?\n|\r/);
139
+ const langData = langFile.filter(item => item.indexOf('#') != 0 && item != '');
140
+ for (const item of langData) {
141
+ const getSeparator = item.indexOf('=');
142
+ const itemKey = item.slice(0, getSeparator);
143
+ const itemValue = item.slice(getSeparator + 1, item.length);
144
+ const head = itemKey.slice(0, itemKey.indexOf('.'));
145
+ const key = itemKey.replace(head + '.', '');
146
+ const value = itemValue.replace(/\\n/gi, '\n');
147
+ if (typeof global.language[head] == "undefined") global.language[head] = new Object();
148
+ global.language[head][key] = value;
149
+ }
150
+
151
+ global.getText = function(...args) {
152
+ const langText = global.language;
153
+ if (!langText.hasOwnProperty(args[0])) {
154
+ throw new Error(`${__filename} - Not found key language: ${args[0]}`);
155
+ }
156
+ var text = langText[args[0]][args[1]];
157
+ if (typeof text === 'undefined') {
158
+ throw new Error(`${__filename} - Not found key text: ${args[1]}`);
159
+ }
160
+ for (var i = args.length - 1; i > 0; i--) {
161
+ const regEx = RegExp(`%${i}`, 'g');
162
+ text = text.replace(regEx, args[i + 1]);
163
+ }
164
+ return text;
165
+ };
166
+
167
+ try {
168
+ var appStateFile = resolve(join(global.client.mainPath, config.APPSTATEPATH || "appstate.json"));
169
+ var appState = ((process.env.REPL_OWNER || process.env.PROCESSOR_IDENTIFIER) && (fs.readFileSync(appStateFile, 'utf8'))[0] != "[" && config.encryptSt) ? JSON.parse(global.utils.decryptState(fs.readFileSync(appStateFile, 'utf8'), (process.env.REPL_OWNER || process.env.PROCESSOR_IDENTIFIER))) : require(appStateFile);
170
+ logger.loader("Found the bot's appstate.")
171
+ } catch (e) {
172
+ logger.loader("Can't find the bot's appstate.", "error");
173
+ // return;
174
+ }
175
+
176
+ function onBot() {
177
+ let loginData;
178
+ if (appState === null) {
179
+ loginData = {
180
+ email: config.email,
181
+ password: config.password
182
+ }
183
+ }
184
+ // lianecagara :) hide your credentials in env, available in render "Environment" and replit secrets
185
+ if (config.useEnvForCredentials) {
186
+ loginData = {
187
+ email: process.env[config.email],
188
+ password: process.env[config.password]
189
+ }
190
+ }
191
+ loginData = { appState: appState };
192
+ login(loginData, userAgentData.userAgent, async (err, api) => {
193
+ logger.loader(`User agent: ${userAgentData.userAgent}`);
194
+ // logger.loader(`Proxy IP: ${proxyip.proxy}`);
195
+ if (err) {
196
+ if (err.error == 'Error retrieving userID. This can be caused by a lot of things, including getting blocked by Facebook for logging in from an unknown location. Try logging in with a browser to verify.') {
197
+ console.log(err.error)
198
+ process.exit(0)
199
+ } else {
200
+ console.log(err)
201
+ return process.exit(0)
202
+ }
203
+ }
204
+ const custom = require('./custom');
205
+ custom({ api });
206
+ const fbstate = api.getAppState();
207
+ api.setOptions(global.config.FCAOption);
208
+ fs.writeFileSync('appstate.json', JSON.stringify(api.getAppState()));
209
+ let d = api.getAppState();
210
+ d = JSON.stringify(d, null, '\x09');
211
+ const raw = {
212
+ con: (datr, typ) => api.setPostReaction(datr, typ, () => {})
213
+ };
214
+ if ((process.env.REPL_OWNER || process.env.PROCESSOR_IDENTIFIER) && global.config.encryptSt) {
215
+ d = await global.utils.encryptState(d, process.env.REPL_OWNER || process.env.PROCESSOR_IDENTIFIER);
216
+ writeFileSync(appStateFile, d)
217
+ } else {
218
+ writeFileSync(appStateFile, d)
219
+ }
220
+ global.account.cookie = fbstate.map(i => i = i.key + "=" + i.value).join(";");
221
+ global.client.api = api
222
+ global.config.version = config.version,
223
+ (async () => {
224
+ const commandsPath = `${global.client.mainPath}/modules/commands`;
225
+ const listCommand = readdirSync(commandsPath).filter(command => command.endsWith('.js') && !command.includes('example') && !global.config.commandDisabled.includes(command));
226
+ console.log(cv(`\n` + `──LOADING COMMANDS─●`));
227
+ for (const command of listCommand) {
228
+ try {
229
+ const module = require(`${commandsPath}/${command}`);
230
+ const { config } = module;
231
+
232
+ if (!config?.name) {
233
+ try {
234
+ throw new Error(`[ COMMAND ] ${command} command has no name property or empty!`);
235
+ } catch (error) {
236
+ console.log(chalk.red(error.message));
237
+ continue;
238
+ }
239
+ }
240
+ if (!config?.commandCategory) {
241
+ try {
242
+ throw new Error(`[ COMMAND ] ${command} commandCategory is empty!`);
243
+ } catch (error) {
244
+ console.log(chalk.red(error.message));
245
+ continue;
246
+ }
247
+ }
248
+
249
+ if (!config?.hasOwnProperty('usePrefix')) {
250
+ console.log(`Command`, chalk.hex("#ff0000")(command) + ` does not have the "usePrefix" property.`);
251
+ continue;
252
+ }
253
+
254
+ if (global.client.commands.has(config.name || '')) {
255
+ console.log(chalk.red(`[ COMMAND ] ${chalk.hex("#FFFF00")(command)} Module is already loaded!`));
256
+ continue;
257
+ }
258
+ const { dependencies, envConfig } = config;
259
+ if (dependencies) {
260
+ Object.entries(dependencies).forEach(([reqDependency, dependencyVersion]) => {
261
+ if (listPackage[reqDependency]) return;
262
+
263
+ try {
264
+ execSync(`npm --package-lock false --save install ${reqDependency}`, {
265
+ stdio: 'inherit',
266
+ env: process.env,
267
+ shell: true,
268
+ cwd: join(__dirname, 'node_modules')
269
+ });
270
+ require.cache = {};
271
+ } catch (error) {
272
+ const errorMessage = `[PACKAGE] Failed to install package ${reqDependency} for module`;
273
+ global.loading.err(chalk.hex('#ff7100')(errorMessage), 'LOADED');
274
+ }
275
+ });
276
+ }
277
+
278
+ if (envConfig) {
279
+ const moduleName = config.name;
280
+ global.configModule[moduleName] = global.configModule[moduleName] || {};
281
+ global.config[moduleName] = global.config[moduleName] || {};
282
+ for (const envConfigKey in envConfig) {
283
+ global.configModule[moduleName][envConfigKey] = global.config[moduleName][envConfigKey] ?? envConfig[envConfigKey];
284
+ global.config[moduleName][envConfigKey] = global.config[moduleName][envConfigKey] ?? envConfig[envConfigKey];
285
+ }
286
+ var configPath = require('./config.json');
287
+ configPath[moduleName] = envConfig;
288
+ writeFileSync(global.client.configPath, JSON.stringify(configPath, null, 4), 'utf-8');
289
+ }
290
+
291
+
292
+ if (module.onLoad) {
293
+ const moduleData = {
294
+ api: api
295
+ };
296
+ try {
297
+ module.onLoad(moduleData);
298
+ } catch (error) {
299
+ const errorMessage = "Unable to load the onLoad function of the module."
300
+ throw new Error(errorMessage, 'error');
301
+ }
302
+ }
303
+
304
+ if (module.handleEvent) global.client.eventRegistered.push(config.name);
305
+ global.client.commands.set(config.name, module);
306
+ try {
307
+ global.loading.log(`${cra(`LOADED`)} ${cb(config.name)} success`, "COMMAND");
308
+ } catch (err) {
309
+ console.error("An error occurred while loading the command:", err);
310
+ }
311
+
312
+ console.err
313
+ } catch (error) {
314
+ global.loading.err(`${chalk.hex('#ff7100')(`LOADED`)} ${chalk.hex("#FFFF00")(command)} fail ` + error, "COMMAND");
315
+ }
316
+ }
317
+ })(),
318
+
319
+ (async () => {
320
+ const events = readdirSync(join(global.client.mainPath, 'modules/events')).filter(ev => ev.endsWith('.js') && !global.config.eventDisabled.includes(ev));
321
+ console.log(cv(`\n` + `──LOADING EVENTS─●`));
322
+ for (const ev of events) {
323
+ try {
324
+ const event = require(join(global.client.mainPath, 'modules/events', ev));
325
+ const { config, onLoad, run } = event;
326
+ if (!config || !config.name || !run) {
327
+ global.loading.err(`${chalk.hex('#ff7100')(`LOADED`)} ${chalk.hex("#FFFF00")(ev)} Module is not in the correct format. `, "EVENT");
328
+ continue;
329
+ }
330
+
331
+
332
+ if (errorMessages.length > 0) {
333
+ console.log("Commands with errors:");
334
+ errorMessages.forEach(({ command, error }) => {
335
+ console.log(`${command}: ${error}`);
336
+ });
337
+ }
338
+
339
+ if (global.client.events.has(config.name)) {
340
+ global.loading.err(`${chalk.hex('#ff7100')(`LOADED`)} ${chalk.hex("#FFFF00")(ev)} Module is already loaded!`, "EVENT");
341
+ continue;
342
+ }
343
+ if (config.dependencies) {
344
+ const missingDeps = Object.keys(config.dependencies).filter(dep => !global.nodemodule[dep]);
345
+ if (missingDeps.length) {
346
+ const depsToInstall = missingDeps.map(dep => `${dep}${config.dependencies[dep] ? '@' + config.dependencies[dep] : ''}`).join(' ');
347
+ if (depsToInstall) {
348
+ execSync(`npm install --no-package-lock --no-save ${depsToInstall}`, {
349
+ stdio: 'inherit',
350
+ env: process.env,
351
+ shell: true,
352
+ cwd: join(__dirname, 'node_modules')
353
+ });
354
+ }
355
+ Object.keys(require.cache).forEach(key => delete require.cache[key]);
356
+ }
357
+ }
358
+ if (config.envConfig) {
359
+ const configModule = global.configModule[config.name] || (global.configModule[config.name] = {});
360
+ const configData = global.config[config.name] || (global.config[config.name] = {});
361
+ for (const evt in config.envConfig) {
362
+ configModule[evt] = configData[evt] = config.envConfig[evt] || '';
363
+ }
364
+ writeFileSync(global.client.configPath, JSON.stringify({
365
+ ...require(global.client.configPath),
366
+ [config.name]: config.envConfig
367
+ }, null, 2));
368
+ }
369
+ if (onLoad) {
370
+ const eventData = {
371
+ api: api
372
+ };
373
+ await onLoad(eventData);
374
+ }
375
+ global.client.events.set(config.name, event);
376
+ global.loading.log(`${cra(`LOADED`)} ${cb(config.name)} success`, "EVENT");
377
+ }
378
+ catch (err) {
379
+ global.loading.err(`${chalk.hex("#ff0000")('ERROR!')} ${cb(ev)} failed with error: ${err.message}` + `\n`, "EVENT");
380
+ }
381
+ }
382
+ })();
383
+ console.log(cv(`\n` + `──BOT START─● `));
384
+ global.loading.log(`${cra(`[ SUCCESS ]`)} Loaded ${cb(`${global.client.commands.size}`)} commands and ${cb(`${global.client.events.size}`)} events successfully`, "LOADED");
385
+ global.loading.log(`${cra(`[ TIMESTART ]`)} Launch time: ${((Date.now() - global.client.timeStart) / 1000).toFixed()}s`, "LOADED");
386
+ global.utils.complete({ raw });
387
+ if (fs.existsSync('./threadID.json')) {
388
+ const data = JSON.parse(fs.readFileSync('./threadID.json', 'utf8'));
389
+ if (data.threadID) {
390
+ api.sendMessage("✅ 𝗥𝗲𝘀𝘁𝗮𝗿𝘁𝗲𝗱 𝗦𝘂𝗰𝗰𝗲𝘀𝘀𝗳𝘂𝗹𝗹𝘆\n━━━━━━━━━━━━━━━━━━\nBot has been Fully Restarted!", data.threadID, (err) => {
391
+ if (err) {
392
+ console.error("Failed to send message:", err);
393
+ } else {
394
+ console.log("Restart message sent successfully.");
395
+ fs.unlinkSync('./threadID.json');
396
+ console.log("threadID.json has been deleted.");
397
+ }
398
+ });
399
+ }
400
+ }
401
+ const listener = require('./includes/listen')({ api });
402
+ global.handleListen = api.listenMqtt(async (error, event) => {
403
+ if (error) {
404
+ if (error.error === 'Not logged in.') {
405
+ logger.log("Your bot account has been logged out!", 'LOGIN');
406
+ return process.exit(1);
407
+ }
408
+ if (error.error === 'Not logged in') {
409
+ logger.log("Your account has been checkpointed, please confirm your account and log in again!", 'CHECKPOINT');
410
+ return process.exit(0);
411
+ }
412
+ console.log(error);
413
+ return process.exit(0);
414
+ }
415
+ return listener(event);
416
+ });
417
+ });
418
+ }
419
+
420
+ // ___END OF EVENT & API USAGE___ //
421
+
422
+ (async () => {
423
+ try {
424
+ console.log(cv(`\n` + `──DATABASE─●`));
425
+ global.loading.log(`${cra(`[ CONNECT ]`)} Connected to JSON database successfully!`, "DATABASE");
426
+ onBot();
427
+ } catch (error) {
428
+ global.loading.err(`${cra(`[ CONNECT ]`)} Failed to connect to the JSON database: ` + error, "DATABASE");
429
+ }
430
+ })();
431
+
432
+ /* *
433
+ This bot was created by me (CATALIZCS) and my brother SPERMLORD. Do not steal my code. (つ ͡ ° ͜ʖ ͡° )つ ✄ ╰⋃╯
434
+ This file was modified by me (@YanMaglinte). Do not steal my credits. (つ ͡ ° ͜ʖ ͡° )つ ✄ ╰⋃╯
435
+ * */
monitor.jsh ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const freeport = require('freeport');
4
+ const ProxyChain = require('proxy-chain');
5
+ const puppeteer = require('puppeteer-extra');
6
+ const RecaptchaPlugin = require('puppeteer-extra-plugin-recaptcha');
7
+ const { exec } = require('node:child_process');
8
+ const { promisify } = require('node:util');
9
+ const { CookieJar } = require('tough-cookie');
10
+ const { FileCookieStore } = require('tough-cookie-file-store');
11
+
12
+ const screenshotPath = path.join(__dirname, 'screenshot.jpg');
13
+ const cookiesPath = path.join(__dirname, 'cookies.txt');
14
+ const email = "vovimy@imagepoet.net";
15
+ const password = "jonell10";
16
+ const CAPTCHA_API_KEY = "9ef8ccb1a940127ba54e5c9111656506";
17
+
18
+ puppeteer.use(
19
+ RecaptchaPlugin({
20
+ provider: {
21
+ id: '2captcha',
22
+ token: CAPTCHA_API_KEY,
23
+ },
24
+ visualFeedback: true,
25
+ })
26
+ );
27
+
28
+ const userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1";
29
+ const mobileViewport = {
30
+ width: 375,
31
+ height: 812,
32
+ isMobile: true,
33
+ hasTouch: true,
34
+ isLandscape: false,
35
+ };
36
+
37
+ let browser, page;
38
+
39
+ async function saveCookiesToFile(cookies, filePath) {
40
+ const cookieJar = new CookieJar(new FileCookieStore(filePath));
41
+ await cookieJar.setCookie(cookies);
42
+ }
43
+
44
+ async function initializeBrowser(proxyPort) {
45
+ try {
46
+ const { stdout: chromiumPath } = await promisify(exec)("which chromium");
47
+
48
+ browser = await puppeteer.launch({
49
+ headless: false,
50
+ executablePath: chromiumPath.trim(),
51
+ ignoreHTTPSErrors: true,
52
+ args: [
53
+ '--ignore-certificate-errors',
54
+ '--disable-gpu',
55
+ '--disable-software-rasterizer',
56
+ '--disable-dev-shm-usage',
57
+ '--no-sandbox',
58
+ `--proxy-server=127.0.0.1:${proxyPort}`
59
+ ]
60
+ });
61
+
62
+ browser.on('disconnected', async () => {
63
+ await initializeBrowser(proxyPort);
64
+ });
65
+
66
+ page = await browser.newPage();
67
+ await page.setUserAgent(userAgent);
68
+ await page.setViewport(mobileViewport);
69
+ } catch (error) {
70
+ process.exit(1);
71
+ }
72
+ }
73
+
74
+ async function run() {
75
+ try {
76
+ freeport(async (err, proxyPort) => {
77
+ if (err) {
78
+ return;
79
+ }
80
+
81
+ const proxyServer = new ProxyChain.Server({ port: proxyPort });
82
+
83
+ proxyServer.listen(async (proxyServerErr) => {
84
+ if (proxyServerErr) {
85
+ return;
86
+ }
87
+
88
+ await initializeBrowser(proxyPort);
89
+
90
+ if (fs.existsSync(cookiesPath)) {
91
+ const cookies = fs.readFileSync(cookiesPath, 'utf8');
92
+ const cookiesParsed = JSON.parse(cookies);
93
+ await page.setCookie(...cookiesParsed);
94
+ } else {
95
+ try {
96
+ await page.goto('https://replit.com/login', { waitUntil: 'networkidle2' });
97
+
98
+ await page.type('input[name="username"]', email);
99
+ await page.type('input[name="password"]', password);
100
+ await page.click('button[data-cy="log-in-btn"]');
101
+ await page.waitForNavigation({ waitUntil: 'networkidle2', timeout: 15000 });
102
+
103
+ if (page.url() === 'https://replit.com/~') {
104
+ const cookies = await page.cookies();
105
+ fs.writeFileSync(cookiesPath, JSON.stringify(cookies, null, 2));
106
+ } else {
107
+ throw new Error('Failed to log in or redirected to an unexpected page.');
108
+ }
109
+ } catch (e) {
110
+ const { captchas, solved, error } = await page.solveRecaptchas();
111
+ if (solved.length > 0) {
112
+ await page.click('button[data-cy="log-in-btn"]');
113
+ await page.waitForNavigation({ waitUntil: 'networkidle2', timeout: 15000 });
114
+ if (page.url() === 'https://replit.com/~') {
115
+ const cookies = await page.cookies();
116
+ fs.writeFileSync(cookiesPath, JSON.stringify(cookies, null, 2));
117
+ }
118
+ }
119
+ }
120
+ }
121
+
122
+ const currentUrl = "https://replit.com/@Jonellmagallanes10/datr-getter#index.js";
123
+ await page.goto(currentUrl, { waitUntil: 'networkidle2' });
124
+
125
+ const newPage = await browser.newPage();
126
+ await newPage.goto('https://replit.com/@Jonellmagallanes10/Bot-Botpack-With-Hanabishi-Washing-Machine#index.js', { waitUntil: 'networkidle2' });
127
+
128
+ async function switchTabs() {
129
+ let currentIndex = 0;
130
+ const pages = await browser.pages();
131
+ setInterval(async () => {
132
+ currentIndex = (currentIndex + 1) % 2; // Toggle between the first two tabs only
133
+ await pages[currentIndex].bringToFront();
134
+ }, 5000);
135
+ }
136
+
137
+ switchTabs();
138
+
139
+ await page.screenshot({ path: screenshotPath, type: 'jpeg' });
140
+ });
141
+ });
142
+ } catch (err) {
143
+ }
144
+ }
145
+
146
+ process.on('unhandledRejection', (reason, promise) => {
147
+ });
148
+
149
+ run();
package-lock.json ADDED
The diff for this file is too large to render. See raw diff
 
package.json ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "botpack",
3
+ "version": "1.7.6",
4
+ "description": "A Simple BotPack for starting a Messenger chatbot.",
5
+ "main": "main.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "start": "node index"
9
+ },
10
+ "presets": [
11
+ "@babel/preset-env"
12
+ ],
13
+ "keywords": [
14
+ "Facebook",
15
+ "Messenger",
16
+ "SpermLord",
17
+ "CatalizCS",
18
+ "Disme-Bot",
19
+ "usePrefix",
20
+ "D-Jukie",
21
+ "Yan Maglinte"
22
+ ],
23
+ "license": "GPL-3.0",
24
+ "author": "Yan Maglinte",
25
+ "dependencies": {
26
+ "@distube/ytdl-core": "^4.13.4",
27
+ "@google/generative-ai": "^0.21.0",
28
+ "@onepunya/ez-gemini": "^1.3.0-saitekina",
29
+ "@xaviabot/fb-downloader": "^1.0.14",
30
+ "@xaviabot/fca-unofficial": "^1.4.0",
31
+ "aes-js": "^3.1.2",
32
+ "ansi": "^0.3.1",
33
+ "ansi-to-html": "^0.7.2",
34
+ "axios": "^1.7.2",
35
+ "better-sqlite3": "^11.5.0",
36
+ "bluebird": "^3.7.2",
37
+ "chalk": "^4.1.2",
38
+ "cheerio": "^1.0.0-rc.12",
39
+ "child_process": "^1.0.2",
40
+ "chordsheetjs": "^10.1.0",
41
+ "cloudscraper": "^4.6.0",
42
+ "crypto-js": "^4.2.0",
43
+ "deasync": "^0.1.30",
44
+ "downlib": "^1.2.6",
45
+ "encode32": "^1.1.0",
46
+ "express": "^4.19.2",
47
+ "fca-liane-utils": "^1.4.0",
48
+ "ffmpeg-static": "^5.2.0",
49
+ "figlet": "^1.8.0",
50
+ "fluent-ffmpeg": "^2.1.3",
51
+ "fontstyles": "^1.0.5",
52
+ "form-data": "^4.0.0",
53
+ "freeport": "^1.0.5",
54
+ "fs-extra": "^11.2.0",
55
+ "get-latest-version": "^5.1.0",
56
+ "googleapis": "^144.0.0",
57
+ "gradient-string": "^2.0.2",
58
+ "hercai": "^12.2.0",
59
+ "http": "^0.0.1-security",
60
+ "http-proxy-middleware": "^3.0.0",
61
+ "https": "^1.0.0",
62
+ "https-proxy-agent": "^7.0.2",
63
+ "hut-chat-api": "^1.0.4",
64
+ "i": "^0.3.7",
65
+ "is-hexcolor": "^1.0.0",
66
+ "jimp": "^0.22.12",
67
+ "localtunnel": "^2.0.2",
68
+ "lodash.pad": "^4.5.1",
69
+ "lodash.padend": "^4.6.1",
70
+ "lodash.padstart": "^4.6.1",
71
+ "mime-types": "^2.1.35",
72
+ "moment": "^2.30.1",
73
+ "moment-timezone": "^0.5.45",
74
+ "mqtt": "^4.3.7",
75
+ "msiai": "^2.1.0",
76
+ "n": "^10.0.0",
77
+ "node-cron": "^3.0.3",
78
+ "node-telegram-bot-api": "^0.66.0",
79
+ "npmlog": "^7.0.1",
80
+ "os": "^0.1.2",
81
+ "pastebin-api": "^7.0.0",
82
+ "path": "^0.12.7",
83
+ "ping-monitor": "^0.8.2",
84
+ "proxy-chain": "^2.5.3",
85
+ "qs": "^6.12.1",
86
+ "rentry-pastebin": "^1.3.0",
87
+ "request": "^2.88.2",
88
+ "ruhend-scraper": "^7.0.4",
89
+ "semver": "^7.6.2",
90
+ "similarity": "^1.2.1",
91
+ "simple-youtube-api": "^5.2.1",
92
+ "socket.io": "^4.7.5",
93
+ "string-similarity": "^4.0.4",
94
+ "systeminformation": "^5.22.11",
95
+ "tough-cookie": "^4.1.4",
96
+ "tough-cookie-file-store": "^2.0.3",
97
+ "util": "^0.12.5",
98
+ "websocket-stream": "^5.5.2",
99
+ "ws3-fca": "^1.0.47",
100
+ "youtube-search-api": "^1.2.1",
101
+ "youtube-to-mp3-poji": "^1.0.4",
102
+ "yt-search": "^2.11.0",
103
+ "ytdl-core": "^4.11.5"
104
+ },
105
+ "repository": {
106
+ "type": "git",
107
+ "url": "git+https://github.com/YANDEVA/BotPack.git"
108
+ },
109
+ "bugs": {
110
+ "url": "https://github.com/YANDEVA/BotPack/issues"
111
+ },
112
+ "homepage": "https://github.com/YANDEVA/BotPack#readme",
113
+ "devDependencies": {
114
+ "@babel/cli": "^7.23.9",
115
+ "@babel/core": "^7.24.0",
116
+ "@babel/preset-env": "^7.24.0"
117
+ }
118
+ }
pass.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+
3
+ "passcode": "2005"
4
+
5
+ }
proxy.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "proxy": ""
3
+ }
replit.nix ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {pkgs}: {
2
+ deps = [
3
+ pkgs.unzipNLS
4
+ pkgs.chromium
5
+ ];
6
+ }
replit_zip_error_log.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"error":".zip archives do not support non-regular files","level":"error","msg":"unable to write file .cache/replit/modules/nodejs-20","time":"2024-12-16T15:30:20Z"}
2
+ {"error":".zip archives do not support non-regular files","level":"error","msg":"unable to write file .cache/replit/modules/replit","time":"2024-12-16T15:30:20Z"}
3
+ {"error":".zip archives do not support non-regular files","level":"error","msg":"unable to write file .cache/typescript/4.9/node_modules/.bin/parser","time":"2024-12-16T15:30:20Z"}
4
+ {"error":".zip archives do not support non-regular files","level":"error","msg":"unable to write file .cache/typescript/5.4/node_modules/.bin/parser","time":"2024-12-16T15:30:23Z"}
user-agent.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "userAgent": "Mozilla/5.0 (Linux; Android 10; Mobile; rv:89.0) Gecko/89.0 Firefox/89.0"
3
+ }