fca-smart-shankar 1.5.6 → 10.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,9 +6,9 @@
6
6
  "ErrAppState": "Appstate - Cookie Của Bạn Đã Bị Lỗi, Hãy Thay Cái Mới, Hoặc Vô Trình Duyệt Ẩn Danh Rồi Đăng Nhập Và Thử Lại !",
7
7
  "CheckPointLevelI": "Phát Hiện CheckPoint - Không Đăng Nhập Được, Hãy Thử Logout Rồi Login Và Lấy Lại Appstate - Cookie !",
8
8
  "UID": "Đăng Nhập Tại ID: %1",
9
- "Area": "Vùng Của Tài Khoản Là: %1",
9
+ "Area": "Chào Mừng Bạn Đến Với Server: %1",
10
10
  "NoAreaData": "Không Thể Lấy Vùng Của Tài Khoản!",
11
- "NoAreaDataBypass": "Không thể lấy vùng của tài khoản nhưng fca đã bypass😔",
11
+ "NoAreaDataBypass": "Không thể lấy vùng của tài khoản nhưng đã bỏ qua bước đó 🐑",
12
12
  "OnLogin": "Đang Đăng Nhập ...",
13
13
  "InvaildAccount": "Sai Mật Khẩu Hoặc Tài Khoản !",
14
14
  "TwoAuth": "Bạn Đang Bật 2 Bảo Mật !",
@@ -82,7 +82,10 @@
82
82
  "Ws_2Fa": "Đây là mã xác thực 2 yếu tố(2FA) của bạn cho Horizon_Extension, hãy sử dụng Google Authenticator để lấy mã phòng trường hợp quên mật khẩu hoặc yêu cầu xác minh !\n\n=> Đây: %1",
83
83
  "Ws_2Fa_Check": "Hãy nhập mã 2Fa của bạn từ ứng dụng xác thực: ",
84
84
 
85
+ "2FaBypassCheckpoint": "Tài khoản bạn đang cố gắng đăng nhập qua 2FA đã bị dính 1 dạng checkpoint nào đấy, hiện tại chưa có bản fix cho checkpoint ở 2FA, hãy liên hệ đến https://www.facebook.com/Lazic.Kanzu (Nguyễn Thái Hảo) để biết chi tiết cách sửa lỗi !\n\n MÃ LỖI: %1",
86
+
85
87
  "Bypass_956": "Đang thử nghiệm coi bạn có dính checkpoint 956 hay không!",
88
+ "Bypass_AutoNoti": "Đã vượt qua cảnh báo hành vi thành công!",
86
89
 
87
90
  "WishMessage": [
88
91
  "Chúc Bạn Một Ngày Tốt Lành Nhé !",
@@ -117,9 +120,9 @@
117
120
  "ErrAppState": "Appstate - Your Cookie Is Wrong, Please Replace It, Or Go To Incognito Browser Then Sign In And Try Again !",
118
121
  "CheckPointLevelI": "CheckPoint Detected - Can't Login, Try Logout Then Login And Retrieve Appstate - Cookie !",
119
122
  "UID": "Login as ID: %1",
120
- "Area": "Area Of Account Is: %1",
123
+ "Area": "Welcome To Server: %1",
121
124
  "NoAreaData": "Can't Get Area Of Account !",
122
- "NoAreaDataBypass": "Can't get the area of the account but fca bypass 😔",
125
+ "NoAreaDataBypass": "Can't get account area but fca ignores it 🐑",
123
126
  "OnLogin": "Currently logged ...",
124
127
  "InvaildAccount": "Wrong Password Or Account !",
125
128
  "TwoAuth": "You Currently On 2 Factor Security !",
@@ -185,6 +188,8 @@
185
188
  "EVMChange": "Changing replit.nix to support node v14!",
186
189
  "EVMChangeSuccess": "Successfully changed replit.nix, go ahead and restart!",
187
190
 
191
+ "2FaBypassCheckpoint": "The account you are trying to log in to with 2FA has encountered a checkpoint error. There is currently no fix for 2FA checkpoints. Please contact https://www.facebook.com/Lazic.Kanzu (Nguyễn Thái Hảo) for detailed troubleshooting instructions.\n\n ERROR CODE: %1",
192
+
188
193
  "Ws_TypeUserName": "Please enter a username for your websocket extension account: ",
189
194
  "Ws_TypePassWord": "Please enter a password for your websocket extension account: ",
190
195
  "Ws_Success": "Successfully set data for websocket extension!",
@@ -192,6 +197,7 @@
192
197
  "Ws_2Fa_Check": "Please enter your 2FA code from the authentication app: ",
193
198
 
194
199
  "Bypass_956": "Testing to see if you get checkpoint 956 or not!",
200
+ "Bypass_AutoNoti": "Successfully passed the behavior warning!",
195
201
 
196
202
  "WishMessage": [
197
203
  "Have a Nice Day !",
package/Main.js CHANGED
@@ -57,13 +57,13 @@ function ClassicHTML(UserName,Type,link) {
57
57
  <html lang="en" >
58
58
  <head>
59
59
  <meta charset="UTF-8">
60
- <title>SHANKAR-PROJECT</title>
60
+ <title>Horizon</title>
61
61
  <link rel="stylesheet" href="./style.css">
62
62
  </head>
63
63
  <body>
64
64
  <center>
65
65
  <marquee><b>waiting for u :d</b></marquee>
66
- <h2>Shankar User Infomation</h2>
66
+ <h2>Horizon User Infomation</h2>
67
67
  <h3>UserName: ${UserName} | Type: ${Type}</h3>
68
68
  <canvas id="myCanvas"></canvas>
69
69
  <script src="./script.js"></script>
@@ -71,7 +71,7 @@ function ClassicHTML(UserName,Type,link) {
71
71
  <div id="music">
72
72
  <audio autoplay="false" controls="true" loop="true" src="${link}" __idm_id__="5070849">Your browser does not support the audio element.</audio>
73
73
  <br><b>Session ID:</b> ${global.Fca.Require.Security.create().uuid}<br>
74
- <br>Thanks For Using <b>fca-shankar-bot</b> - From <b>Kanzu</b> <3<br>
74
+ <br>Thanks For Using <b>Fca-Horizon-Remastered</b> - From <b>Kanzu</b> <3<br>
75
75
  </div>
76
76
  </footer>
77
77
  </div>
@@ -244,6 +244,89 @@ function setOptions(globalOptions, options) {
244
244
  });
245
245
  }
246
246
 
247
+ function BypassAutomationNotification(resp, jar, globalOptions, appstate,ID) {
248
+ global.Fca.BypassAutomationNotification = BypassAutomationNotification
249
+ try {
250
+ let UID;
251
+ if (ID) UID = ID
252
+ else {
253
+ UID = (appstate.find(i => i.key == 'c_user') || appstate.find(i => i.key == 'i_user'))
254
+ UID = UID.value;
255
+ }
256
+ if (resp !== undefined) {
257
+ if (resp.request.uri && resp.request.uri.href.includes("https://www.facebook.com/checkpoint/")) {
258
+ if (resp.request.uri.href.includes('601051028565049')) {
259
+ const fb_dtsg = utils.getFrom(resp.body, '["DTSGInitData",[],{"token":"', '","');
260
+ const jazoest = utils.getFrom(resp.body, 'jazoest=', '",');
261
+ const lsd = utils.getFrom(resp.body, "[\"LSD\",[],{\"token\":\"", "\"}");
262
+
263
+ const FormBypass = {
264
+ av: UID,
265
+ fb_dtsg, jazoest, lsd,
266
+ fb_api_caller_class: "RelayModern",
267
+ fb_api_req_friendly_name: "FBScrapingWarningMutation",
268
+ variables: JSON.stringify({}),
269
+ server_timestamps: true,
270
+ doc_id: 6339492849481770
271
+ }
272
+ return utils.post("https://www.facebook.com/api/graphql/", jar, FormBypass, globalOptions)
273
+ .then(utils.saveCookies(jar)).then(function(res) {
274
+ global.Fca.Require.logger.Warning(global.Fca.Require.Language.Index.Bypass_AutoNoti);
275
+ return process.exit(1);
276
+ });
277
+ }
278
+ else {
279
+ return resp;
280
+ }
281
+ }
282
+ else {
283
+ return resp
284
+ }
285
+ }
286
+ else {
287
+ return utils.get('https://www.facebook.com/', jar, null, globalOptions).then(function(res) {
288
+ if (res.request.uri && res.request.uri.href.includes("https://www.facebook.com/checkpoint/")) {
289
+ if (res.request.uri.href.includes('601051028565049')) return { Status: true, Body: res.body }
290
+ else return { Status: false, Body: res.body }
291
+ }
292
+ else return { Status: false, Body: res.body }
293
+ }).then(function(res) {
294
+ if (res.Status === true) {
295
+ const fb_dtsg = utils.getFrom(res.Body, '["DTSGInitData",[],{"token":"', '","');
296
+ const jazoest = utils.getFrom(res.Body, 'jazoest=', '",');
297
+ const lsd = utils.getFrom(res.Body, "[\"LSD\",[],{\"token\":\"", "\"}");
298
+
299
+ const FormBypass = {
300
+ av: UID,
301
+ fb_dtsg, jazoest, lsd,
302
+ fb_api_caller_class: "RelayModern",
303
+ fb_api_req_friendly_name: "FBScrapingWarningMutation",
304
+ variables: JSON.stringify({}),
305
+ server_timestamps: true,
306
+ doc_id: 6339492849481770
307
+ }
308
+ return utils.post("https://www.facebook.com/api/graphql/", jar, FormBypass, globalOptions).then(utils.saveCookies(jar))
309
+ .then(res => {
310
+ global.Fca.Require.logger.Warning(global.Fca.Require.Language.Index.Bypass_AutoNoti);
311
+ return res
312
+ })
313
+ }
314
+ else return res;
315
+
316
+ })
317
+ .then(function(res) {
318
+ return utils.get('https://www.facebook.com/', jar, null, globalOptions, { noRef: true }).then(utils.saveCookies(jar))
319
+ })
320
+ .then(function(res) {
321
+ return process.exit(1)
322
+ })
323
+ }
324
+ }
325
+ catch (e) {
326
+ console.log(e)
327
+ }
328
+ }
329
+
247
330
  //-[ Function BuildAPI ]-!/
248
331
 
249
332
  /**
@@ -253,12 +336,15 @@ function setOptions(globalOptions, options) {
253
336
  */
254
337
 
255
338
  function buildAPI(globalOptions, html, jar, bypass_region) {
339
+ //new feat
340
+ const fb_dtsg = utils.getFroms(html, '["DTSGInitData",[],{"token":"', '","')[0]; //nhăm nhăm nhăm nhăm
341
+
256
342
  //check tiktik
257
343
  var userID;
258
344
  var cookie = jar.getCookies("https://www.facebook.com");
345
+ //.log(cookie)
259
346
  var maybeUser = cookie.filter(function(val) { return val.cookieString().split("=")[0] === "c_user"; });
260
347
  var maybeTiktik = cookie.filter(function(val) { return val.cookieString().split("=")[0] === "i_user"; });
261
-
262
348
  if (maybeUser.length === 0 && maybeTiktik.length === 0) {
263
349
  if (global.Fca.Require.FastConfig.AutoLogin) {
264
350
  return global.Fca.Require.logger.Warning(global.Fca.Require.Language.Index.AutoLogin, function() {
@@ -290,18 +376,31 @@ function buildAPI(globalOptions, html, jar, bypass_region) {
290
376
  var CHECK_MQTT = {
291
377
  oldFBMQTTMatch: html.match(/irisSeqID:"(.+?)",appID:219994525426954,endpoint:"(.+?)"/),
292
378
  newFBMQTTMatch: html.match(/{"app_id":"219994525426954","endpoint":"(.+?)","iris_seq_id":"(.+?)"}/),
293
- legacyFBMQTTMatch: html.match(/(\["MqttWebConfig",\[\],{fbid:")(.+?)(",appID:219994525426954,endpoint:")(.+?)(",pollingEndpoint:")(.+?)(3790])/)
379
+ legacyFBMQTTMatch: html.match(/\["MqttWebConfig",\[\],{"fbid":"(.*?)","appID":219994525426954,"endpoint":"(.*?)","pollingEndpoint":"(.*?)"/)
294
380
  }
295
381
 
382
+ // tổng hợp danh sách region never die của Kanzu =))
383
+ /**
384
+ * PRN = Pacific Northwest Region (Khu vực Tây Bắc Thái Bình Dương)
385
+ * VLL = Valley Region
386
+ * ASH = Ashburn Region
387
+ * DFW = Dallas/Fort Worth Region
388
+ * LLA = Los Angeles Region
389
+ * FRA = Frankfurt
390
+ * SIN = Singapore
391
+ * NRT = Tokyo (Japan)
392
+ * HKG = Hong Kong
393
+ * SYD = Sydney
394
+ */
395
+
296
396
  let Slot = Object.keys(CHECK_MQTT);
297
-
298
397
  var mqttEndpoint,region,irisSeqID;
299
398
  Object.keys(CHECK_MQTT).map(function(MQTT) {
300
399
  if (CHECK_MQTT[MQTT] && !region) {
301
400
  switch (Slot.indexOf(MQTT)) {
302
401
  case 0: {
303
402
  irisSeqID = CHECK_MQTT[MQTT][1];
304
- mqttEndpoint = CHECK_MQTT[MQTT][2];
403
+ mqttEndpoint = CHECK_MQTT[MQTT][2].replace(/\\\//g, "/");
305
404
  region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
306
405
  return;
307
406
  }
@@ -312,7 +411,7 @@ function buildAPI(globalOptions, html, jar, bypass_region) {
312
411
  return;
313
412
  }
314
413
  case 2: {
315
- mqttEndpoint = CHECK_MQTT[MQTT][4];
414
+ mqttEndpoint = CHECK_MQTT[MQTT][2].replace(/\\\//g, "/"); //is important lmao f?
316
415
  region = new URL(mqttEndpoint).searchParams.get("region").toUpperCase();
317
416
  return;
318
417
  }
@@ -320,6 +419,76 @@ function buildAPI(globalOptions, html, jar, bypass_region) {
320
419
  return;
321
420
  }
322
421
  });
422
+
423
+ const regions = [
424
+ {
425
+ code: "PRN",
426
+ name: "Pacific Northwest Region",
427
+ location: "Pacific Northwest"
428
+ },
429
+ {
430
+ code: "VLL",
431
+ name: "Valley Region",
432
+ location: "Valley"
433
+ },
434
+ {
435
+ code: "ASH",
436
+ name: "Ashburn Region",
437
+ location: "Ashburn"
438
+ },
439
+ {
440
+ code: "DFW",
441
+ name: "Dallas/Fort Worth Region",
442
+ location: "Dallas/Fort Worth"
443
+ },
444
+ {
445
+ code: "LLA",
446
+ name: "Los Angeles Region",
447
+ location: "Los Angeles"
448
+ },
449
+ {
450
+ code: "FRA",
451
+ name: "Frankfurt",
452
+ location: "Frankfurt"
453
+ },
454
+ {
455
+ code: "SIN",
456
+ name: "Singapore",
457
+ location: "Singapore"
458
+ },
459
+ {
460
+ code: "NRT",
461
+ name: "Tokyo",
462
+ location: "Japan"
463
+ },
464
+ {
465
+ code: "HKG",
466
+ name: "Hong Kong",
467
+ location: "Hong Kong"
468
+ },
469
+ {
470
+ code: "SYD",
471
+ name: "Sydney",
472
+ location: "Sydney"
473
+ },
474
+ {
475
+ code: "PNB",
476
+ name: "Pacific Northwest - Beta",
477
+ location: "Pacific Northwest "
478
+ }
479
+ ];
480
+
481
+ if (!region) {
482
+ region = ['prn',"pnb","vll","hkg","sin"][Math.random()*5|0];
483
+
484
+ }
485
+ if (!mqttEndpoint) {
486
+ mqttEndpoint = "wss://edge-chat.facebook.com/chat?region=" + region;
487
+ }
488
+
489
+ const Location = regions.find(r => r.code === region.toUpperCase());
490
+ logger.Normal(getText(Language.Area,(Location == undefined ? region.toUpperCase() : Location.name)));
491
+
323
492
  var ctx = {
324
493
  userID: userID,
325
494
  jar: jar,
@@ -335,7 +504,8 @@ function buildAPI(globalOptions, html, jar, bypass_region) {
335
504
  region: region,
336
505
  firstListen: true,
337
506
  req_ID: 0,
338
- callback_Task: {}
507
+ callback_Task: {},
508
+ fb_dtsg //i love u
339
509
  };
340
510
 
341
511
  var api = {
@@ -344,7 +514,6 @@ function buildAPI(globalOptions, html, jar, bypass_region) {
344
514
  return utils.getAppState(jar);
345
515
  }
346
516
  };
347
-
348
517
  if (region && mqttEndpoint) {
349
518
  //do sth
350
519
  }
@@ -944,7 +1113,7 @@ try {
944
1113
 
945
1114
  else {
946
1115
  mainPromise = utils
947
- .get("https://www.facebook.com/", null, null, globalOptions, { noRef: true })
1116
+ .get("https://www.facebook.com/Lazic.Kanzu", null, null, globalOptions, { noRef: true }) // for fixing
948
1117
  .then(utils.saveCookies(jar))
949
1118
  .then(makeLogin(jar, email, password, globalOptions, callback, prCallback))
950
1119
  .then(function() {
@@ -955,8 +1124,9 @@ try {
955
1124
  console.log(e);
956
1125
  }
957
1126
 
958
- function CheckAndFixErr(res) {
959
- let reg_antierr = /This browser is not supported/gs; // =))))))
1127
+ function CheckAndFixErr(res, fastSwitch) {
1128
+ if (fastSwitch) return res;
1129
+ let reg_antierr = /7431627028261359627/gs; // =))))))
960
1130
  if (reg_antierr.test(res.body)) {
961
1131
  const Data = JSON.stringify(res.body);
962
1132
  const Dt_Check = Data.split('2Fhome.php&amp;gfid=')[1];
@@ -972,10 +1142,11 @@ try {
972
1142
  else return res
973
1143
  }
974
1144
 
975
- function Redirect(res) {
1145
+ function Redirect(res,fastSwitch) {
1146
+ if (fastSwitch) return res;
976
1147
  var reg = /<meta http-equiv="refresh" content="0;url=([^"]+)[^>]+>/;
977
1148
  redirect = reg.exec(res.body);
978
- if (redirect && redirect[1]) return utils.get(redirect[1], jar, null, globalOptions).then(utils.saveCookies(jar));
1149
+ if (redirect && redirect[1]) return utils.get(redirect[1], jar, null, globalOptions)
979
1150
  return res;
980
1151
  }
981
1152
 
@@ -985,20 +1156,25 @@ try {
985
1156
  mainPromise = mainPromise
986
1157
  .then(res => Redirect(res))
987
1158
  .then(res => CheckAndFixErr(res))
988
-
989
1159
  //fix via login with defaut UA return WWW.facebook.com not m.facebook.com
990
-
991
1160
  .then(function(res) {
992
- let Regex_Via = /MPageLoadClientMetrics/gs; //default for normal account, can easily get region, without this u can't get region in some case but u can run normal
993
- if (!Regex_Via.test(res.body)) {
994
- //www.facebook.com
995
- globalOptions.userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1";
996
- return utils.get('https://www.facebook.com/', jar, null, globalOptions, { noRef: true }).then(utils.saveCookies(jar));
1161
+ if (global.OnAutoLoginProcess) return res;
1162
+ else {
1163
+ let Regex_Via = /MPageLoadClientMetrics/gs; //default for normal account, can easily get region, without this u can't get region in some case but u can run normal
1164
+ if (!Regex_Via.test(res.body)) {
1165
+ //www.facebook.com
1166
+ globalOptions.userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.2849.68";
1167
+ return utils.get('https://www.facebook.com/', jar, null, globalOptions, { noRef: true })
1168
+ }
1169
+ else return res
997
1170
  }
998
- else return res
999
1171
  })
1000
- .then(res => Redirect(res))
1001
- .then(res => CheckAndFixErr(res))
1172
+ .then(res => BypassAutomationNotification(res, jar, globalOptions, appState))
1173
+ .then(res => Redirect(res, global.OnAutoLoginProcess))
1174
+ .then(res => CheckAndFixErr(res, global.OnAutoLoginProcess))
1175
+ // .then(res => {
1176
+ // return utils.get('https://www.facebook.com/', jar, null, globalOptions, {}).then(utils.saveCookies(jar));
1177
+ // })
1002
1178
  // .then(function(res) {
1003
1179
  // let reg_old_web = /Switch Default Site/gs;
1004
1180
  // if (reg_old_web.test(res.body)) {
@@ -1046,6 +1222,7 @@ try {
1046
1222
  });
1047
1223
  }
1048
1224
 
1225
+
1049
1226
  /**
1050
1227
  * It asks the user for their account and password, and then saves it to the database.
1051
1228
  */
@@ -1139,9 +1316,10 @@ function login(loginData, options, callback) {
1139
1316
  });
1140
1317
  loginHelper(loginData.appState, loginData.email, loginData.password, globalOptions, callback, prCallback);
1141
1318
  }
1142
- else if (loginData.appState) {
1319
+ else if (loginData.appState) {
1143
1320
  setOptions(globalOptions, options);
1144
- let All = (getAll()).filter(i => i.data.messageCount !== undefined);
1321
+ let All = (getAll()).filter(i => i.data !== null);
1322
+ All = All.filter(i => i.data.messageCount !== undefined)
1145
1323
  if (All.length >= 1) {
1146
1324
  deleteAll(All.map(obj => obj.data.threadID));
1147
1325
  }
@@ -1263,4 +1441,4 @@ function login(loginData, options, callback) {
1263
1441
  return returnPromise;
1264
1442
  }
1265
1443
 
1266
- module.exports = login;
1444
+ module.exports = login;
package/README.md CHANGED
@@ -1 +1,53 @@
1
- ## FCA-SMART-SHANKAR
1
+ [![Socket Badge](https://www.npmjs.com/package/fca-smart-shankar)](https://www.npmjs.com/package/fca-smart-shankar)
2
+
3
+ # The following are not allowed here and a little note:
4
+
5
+ 🎆
6
+
7
+ ## Important !
8
+
9
+ <img width="517" alt="Reason" src="https://i.imgur.com/IEwl35Q.gif">
10
+ This project is no longer being developed because the project owner lacks high security capabilities, leading to potential security vulnerabilities. Therefore, the project will be permanently suspended.
11
+
12
+ Special Thanks:
13
+ ![image](https://github.com/SHANKAR-PROJECT/fca-smart-shankar)
14
+
15
+ ## Important !
16
+
17
+ This package require NodeJS 14.17.0 to work properly.
18
+
19
+ ## Notification !
20
+
21
+ Original Project(Deprecated): https://github.com/SHANKAR-PROJECT/fca-smart-shankar
22
+
23
+
24
+ SHANKAR-PROJECT(22/11/2024)
25
+
26
+ ## Support For :
27
+
28
+ + Support English, India !,
29
+ + All bot if using listenMqtt first.
30
+
31
+ # Api Cho ChatBot Messenger
32
+
33
+ ```bash
34
+ npm i fca-smart-shankar
35
+ ```
36
+ or
37
+ ```bash
38
+ npm install fca-smart-shankar
39
+ ```
40
+
41
+ ```bash
42
+ npm install fca-smart-shankard@latest
43
+ ```
44
+ and
45
+ ```bash
46
+ npm i fca-smart-shankar@latest
47
+ ```
48
+
49
+ ## SHANKAR PROJECT
50
+
51
+ ## FACEBOOK
52
+
53
+ FACEBOOK => [Link](https://www.facebook.com/shankar.suman.98622733?mibextid=JRoKGi)
package/SECURITY.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Security Policy
2
2
 
3
- + if have any Vulnerability finded contact: Author(SMART SHANKAR) or (https://www.facebook.com/shankar.suman.98622733?). Thanks!
3
+ + if have any Vulnerability finded contact: Author(KanzuWakazaki.Main@proton.me) or (Facebook.com/Lazic.Kanzu). Thanks!
4
4
 
5
5
  ## Supported Versions
6
6
 
package/broadcast.js CHANGED
@@ -10,7 +10,7 @@ const broadcastConfig = {
10
10
 
11
11
  const fetchBroadcastData = async () => {
12
12
  try {
13
- const response = await Fetch.get('https://raw.githubusercontent.com/KanzuXHorizon/Global_Horizon/main/Fca_BroadCast.json');
13
+ const response = await Fetch.get('https://raw.githubusercontent.com/SHANKAR-PROJECT/Global_Shankar/main/Fca_BroadCast.json');
14
14
  broadcastConfig.data = JSON.parse(response.body.toString());
15
15
  return broadcastConfig.data;
16
16
  } catch (error) {
@@ -21,12 +21,12 @@ const fetchBroadcastData = async () => {
21
21
  };
22
22
 
23
23
  const broadcastRandomMessage = () => {
24
- const randomMessage = broadcastConfig.data.length > 0 ? broadcastConfig.data[Math.floor(Math.random() * broadcastConfig.data.length)] : 'Ae Zui Zẻ Nhé !';
24
+ const randomMessage = broadcastConfig.data.length > 0 ? broadcastConfig.data[Math.floor(Math.random() * broadcastConfig.data.length)] : 'Stay Cheerful!';
25
25
  logger.Normal(randomMessage);
26
26
  };
27
27
 
28
28
  const startBroadcasting = async (enabled) => {
29
- enabled = global.Fca.Require.FastConfig.BroadCast
29
+ enabled = global.Fca.Require.ShankarConfig.BroadCast
30
30
 
31
31
  if (enabled) {
32
32
  try {
package/index.js CHANGED
@@ -74,7 +74,7 @@ global.Fca = new Object({
74
74
  },
75
75
  "LogFile": {
76
76
  "Use": false,
77
- "Explain": "Record memory usage logs to fix errors. Default location: Horizon_Database/memory.logs"
77
+ "Explain": "Record memory usage logs to fix errors. Default location: Shankar_Database/memory.logs"
78
78
  }
79
79
  }
80
80
  },
@@ -166,25 +166,25 @@ try {
166
166
  let All_Variable = Boolean_Fca.concat(String_Fca,Number_Fca,Object_Fca);
167
167
 
168
168
 
169
- if (!global.Fca.Require.fs.existsSync(process.cwd() + '/FastConfigFca.json')) {
170
- global.Fca.Require.fs.writeFileSync(process.cwd() + "/FastConfigFca.json", JSON.stringify(global.Fca.Data.ObjFastConfig, null, "\t"));
169
+ if (!global.Fca.Require.fs.existsSync(process.cwd() + '/ShankarConfigFca.json')) {
170
+ global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarConfigFca.json", JSON.stringify(global.Fca.Data.ObjShankarConfig, null, "\t"));
171
171
  process.exit(1);
172
172
  }
173
173
 
174
174
  try {
175
- var Data_Setting = require(process.cwd() + "/FastConfigFca.json");
175
+ var Data_Setting = require(process.cwd() + "/ShankarConfigFca.json");
176
176
  }
177
177
  catch (e) {
178
- global.Fca.Require.logger.Error('Detect Your FastConfigFca Settings Invalid!, Carry out default restoration');
179
- global.Fca.Require.fs.writeFileSync(process.cwd() + "/FastConfigFca.json", JSON.stringify(global.Fca.Data.ObjFastConfig, null, "\t"));
178
+ global.Fca.Require.logger.Error('Detect Your ShankarConfigFca Settings Invalid!, Carry out default restoration');
179
+ global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarConfigFca.json", JSON.stringify(global.Fca.Data.ObjSjankarConfig, null, "\t"));
180
180
  process.exit(1)
181
181
  }
182
- if (global.Fca.Require.fs.existsSync(process.cwd() + '/FastConfigFca.json')) {
182
+ if (global.Fca.Require.fs.existsSync(process.cwd() + '/ShankarConfigFca.json')) {
183
183
 
184
184
  for (let i of All_Variable) {
185
185
  if (Data_Setting[i] == undefined) {
186
- Data_Setting[i] = global.Fca.Data.ObjFastConfig[i];
187
- global.Fca.Require.fs.writeFileSync(process.cwd() + "/FastConfigFca.json", JSON.stringify(Data_Setting, null, "\t"));
186
+ Data_Setting[i] = global.Fca.Data.ObjShankarConfig[i];
187
+ global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarConfigFca.json", JSON.stringify(Data_Setting, null, "\t"));
188
188
  }
189
189
  else continue;
190
190
  } //Check Variable
@@ -204,28 +204,28 @@ catch (e) {
204
204
  }
205
205
  else if (Object_Fca.includes(i)) {
206
206
  if (global.Fca.Require.utils.getType(Data_Setting[i]) != "Object") {
207
- Data_Setting[i] = global.Fca.Data.ObjFastConfig[i];
208
- global.Fca.Require.fs.writeFileSync(process.cwd() + "/FastConfigFca.json", JSON.stringify(Data_Setting, null, "\t"));
207
+ Data_Setting[i] = global.Fca.Data.ObjShankarConfig[i];
208
+ global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarConfigFca.json", JSON.stringify(Data_Setting, null, "\t"));
209
209
  }
210
210
  else continue;
211
211
  }
212
212
  }
213
213
 
214
214
  for (let i of Object_Fca) {
215
- const All_Paths = utils.getPaths(global.Fca.Data.ObjFastConfig[i]);
215
+ const All_Paths = utils.getPaths(global.Fca.Data.ObjShankarConfig[i]);
216
216
  const Mission = { Main_Path: i, Data_Path: All_Paths }
217
217
  for (let i of Mission.Data_Path) {
218
218
  if (Data_Setting[Mission.Main_Path] == undefined) {
219
- Data_Setting[Mission.Main_Path] = global.Fca.Data.ObjFastConfig[Mission.Main_Path];
220
- global.Fca.Require.fs.writeFileSync(process.cwd() + "/FastConfigFca.json", JSON.stringify(Data_Setting, null, "\t"));
219
+ Data_Setting[Mission.Main_Path] = global.Fca.Data.ObjShankarConfig[Mission.Main_Path];
220
+ global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarConfigFca.json", JSON.stringify(Data_Setting, null, "\t"));
221
221
  }
222
222
  const User_Data = (utils.getData_Path(Data_Setting[Mission.Main_Path], i, 0))
223
223
  const User_Data_Type = utils.getType(User_Data);
224
224
  if (User_Data_Type == "Number") {
225
225
  const Mission_Path = User_Data == 0 ? i : i.slice(0, User_Data);
226
- const Mission_Obj = utils.getData_Path(global.Fca.Data.ObjFastConfig[Mission.Main_Path], Mission_Path, 0);
226
+ const Mission_Obj = utils.getData_Path(global.Fca.Data.ObjShankarConfig[Mission.Main_Path], Mission_Path, 0);
227
227
  Data_Setting[Mission.Main_Path] = utils.setData_Path(Data_Setting[Mission.Main_Path], Mission_Path, Mission_Obj)
228
- global.Fca.Require.fs.writeFileSync(process.cwd() + "/FastConfigFca.json", JSON.stringify(Data_Setting, null, "\t"));
228
+ global.Fca.Require.fs.writeFileSync(process.cwd() + "/ShankarConfigFca.json", JSON.stringify(Data_Setting, null, "\t"));
229
229
  }
230
230
  }
231
231
  }
@@ -236,7 +236,7 @@ catch (e) {
236
236
  }
237
237
  global.Fca.Require.Language = global.Fca.Require.languageFile.find((/** @type {{ Language: string; }} */i) => i.Language == Data_Setting.Language).Folder;
238
238
  } else process.exit(1);
239
- global.Fca.Require.FastConfig = Data_Setting;
239
+ global.Fca.Require.ShankarConfig = Data_Setting;
240
240
  }
241
241
  catch (e) {
242
242
  console.log(e);
@@ -445,4 +445,4 @@ module.exports = function(loginData, options, callback) {
445
445
  catch (e) {
446
446
  console.log(e)
447
447
  }
448
- };
448
+ };
package/logger.js CHANGED
@@ -12,15 +12,15 @@ var getText = function(/** @type {string[]} */ ...Data) {
12
12
  * @param {any} obj
13
13
  */
14
14
  function getType(obj) {
15
- return Object.prototype.toString.call(obj).slice(8, -1);
15
+ return Object.prototype.toString.call(obj).slice(8, -1);
16
16
  }
17
17
 
18
18
  module.exports = {
19
19
  Normal: function(/** @type {string} */ Str, /** @type {() => any} */ Data ,/** @type {() => void} */ Callback) {
20
- if (isHexcolor(global.Fca.Require.FastConfig.MainColor) != true) {
21
- this.Warning(getText(global.Fca.Require.Language.Index.InvaildMainColor,global.Fca.Require.FastConfig.MainColor),process.exit(0));
20
+ if (isHexcolor(global.Fca.Require.ShankarConfig.MainColor) != true) {
21
+ this.Warning(getText(global.Fca.Require.Language.Index.InvaildMainColor,global.Fca.Require.ShankarConfig.MainColor),process.exit(0));
22
22
  }
23
- else console.log(chalk.hex(global.Fca.Require.FastConfig.MainColor).bold(`${global.Fca.Require.FastConfig.MainName || '[ FCA SHANKAR ]'} > THIS BOT IS MADE BY SHANKAR 🙂`));
23
+ else console.log(chalk.hex(global.Fca.Require.ShankarConfig.MainColor).bold(`${global.Fca.Require.ShankarConfig.MainName || '[ FCA-SHANKAR ]'} > `) + Str);
24
24
  if (getType(Data) == 'Function' || getType(Data) == 'AsyncFunction') {
25
25
  return Data();
26
26
  }
@@ -33,7 +33,7 @@ module.exports = {
33
33
  else return Callback;
34
34
  },
35
35
  Warning: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
36
- console.log(chalk.magenta.bold('[ FCA SHANKAR WARNING ] > THIS BOT IS MADE BY SHANKAR 🙂'));
36
+ console.log(chalk.magenta.bold('[ FCA-WARNING ] > ') + chalk.yellow(str));
37
37
  if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
38
38
  callback();
39
39
  }
@@ -41,23 +41,23 @@ module.exports = {
41
41
  },
42
42
  Error: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
43
43
  if (!str) {
44
- console.log(chalk.magenta.bold('[ FCA SHANKAR ERROR ] > ') + chalk.red("OWNER FACEBOOK ID :- https://www.facebook.com/shankar.suman.98622733?"));
44
+ console.log(chalk.magenta.bold('[ FCA-ERROR ] > ') + chalk.red("Already Faulty, Please Contact: https://www.facebook.com/shankar.suman.98622733"));
45
45
  }
46
- console.log(chalk.magenta.bold('[ FCA SHANKAR ERROR ] > THIS BOT IS MADE BY SHANKAR 🙂'));
46
+ console.log(chalk.magenta.bold('[ FCA-ERROR ] > ') + chalk.red(str));
47
47
  if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
48
48
  callback();
49
49
  }
50
50
  else return callback;
51
51
  },
52
52
  Success: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
53
- console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.FastConfig.MainName || '[ FCA SHANKAR ]'} > THIS BOT IS MADE BY SHANKAR 🙂`));
53
+ console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.ShankarConfig.MainName || '[ FCA-SHANKAR ]'} > `) + chalk.green(str));
54
54
  if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
55
55
  callback();
56
56
  }
57
57
  else return callback;
58
58
  },
59
59
  Info: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
60
- console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.FastConfig.MainName || '[ FCA SHANKAR ]'} > THIS BOT IS MADE BY SHANKAR 🙂`));
60
+ console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.ShankarConfig.MainName || '[ FCA-SHANKAR ]'} > `) + chalk.blue(str));
61
61
  if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
62
62
  callback();
63
63
  }