fca-priyansh 19.0.1 → 20.0.0

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.
Files changed (135) hide show
  1. package/.gitlab-ci.yml +22 -0
  2. package/CountTime.json +1 -0
  3. package/Extra/Balancer.js +49 -49
  4. package/Extra/BroadcastSystem.js +1 -0
  5. package/Extra/Bypass/956/index.js +233 -233
  6. package/Extra/Bypass/test/aaaa.json +169 -169
  7. package/Extra/Bypass/test/index.js +187 -187
  8. package/Extra/Database/index.js +468 -468
  9. package/Extra/ExtraAddons.js +82 -82
  10. package/Extra/ExtraFindUID.js +61 -61
  11. package/Extra/ExtraGetThread.js +365 -365
  12. package/Extra/ExtraScreenShot.js +430 -430
  13. package/Extra/ExtraUptimeRobot.js +142 -38
  14. package/Extra/Html/Classic/script.js +118 -118
  15. package/Extra/Html/Classic/style.css +7 -7
  16. package/Extra/Security/Base/Step_1.js +5 -5
  17. package/Extra/Security/Base/Step_2.js +22 -22
  18. package/Extra/Security/Base/Step_3.js +22 -22
  19. package/Extra/Security/Base/index.js +190 -190
  20. package/Extra/Security/Index.js +4 -4
  21. package/Extra/Security/Step_1.js +5 -5
  22. package/Extra/Security/Step_2.js +22 -22
  23. package/Extra/Security/Step_3.js +22 -22
  24. package/Extra/Src/Change_Environment.js +24 -24
  25. package/Extra/Src/Check_Update.js +66 -66
  26. package/Extra/Src/History.js +114 -114
  27. package/Extra/Src/Instant_Update.js +64 -64
  28. package/Extra/Src/Last-Run.js +64 -64
  29. package/Extra/Src/Premium.js +81 -81
  30. package/Extra/Src/Websocket.js +212 -212
  31. package/Extra/Src/uuid.js +137 -137
  32. package/Func/AcceptAgreement.js +31 -31
  33. package/Func/ClearCache.js +64 -64
  34. package/Func/ReportV1.js +54 -54
  35. package/LICENSE +21 -21
  36. package/Language/index.json +228 -228
  37. package/Main.js +1 -1290
  38. package/README.md +198 -198
  39. package/broadcast.js +1 -44
  40. package/errorHandler.js +151 -0
  41. package/index.js +1 -448
  42. package/logger.js +69 -66
  43. package/package.json +99 -98
  44. package/src/Dev_Horizon_Data.js +124 -124
  45. package/src/Dev_getThreadInfoOLD.js +421 -421
  46. package/src/Dev_shareTest2.js +68 -68
  47. package/src/Dev_shareTest3.js +71 -71
  48. package/src/Premium.js +24 -24
  49. package/src/Screenshot.js +82 -82
  50. package/src/addExternalModule.js +16 -16
  51. package/src/addUserToGroup.js +79 -79
  52. package/src/changeAdminStatus.js +79 -79
  53. package/src/changeArchivedStatus.js +41 -41
  54. package/src/changeAvt.js +84 -84
  55. package/src/changeBio.js +65 -65
  56. package/src/changeBlockedStatus.js +36 -36
  57. package/src/changeGroupImage.js +106 -106
  58. package/src/changeNickname.js +45 -45
  59. package/src/changeThreadColor.js +62 -62
  60. package/src/changeThreadEmoji.js +42 -42
  61. package/src/changeThreadTheme.js +263 -0
  62. package/src/comment.js +244 -0
  63. package/src/createNewGroup.js +70 -70
  64. package/src/createPoll.js +60 -60
  65. package/src/deleteMessage.js +45 -45
  66. package/src/deleteThread.js +43 -43
  67. package/src/editMessage.js +71 -71
  68. package/src/follow.js +119 -0
  69. package/src/forwardAttachment.js +48 -48
  70. package/src/friend.js +383 -0
  71. package/src/getAccessToken.js +27 -27
  72. package/src/getCurrentUserID.js +7 -7
  73. package/src/getEmojiUrl.js +27 -27
  74. package/src/getFriendsList.js +73 -73
  75. package/src/getMessage.js +102 -102
  76. package/src/getPendingFriendRequests.js +45 -0
  77. package/src/getThreadHistory.js +537 -537
  78. package/src/getThreadInfo.js +424 -423
  79. package/src/getThreadInfoOLD.js +421 -421
  80. package/src/getThreadList.js +213 -213
  81. package/src/getThreadMain.js +219 -219
  82. package/src/getThreadPictures.js +59 -59
  83. package/src/getUID.js +58 -58
  84. package/src/getUserID.js +62 -62
  85. package/src/getUserInfo.js +112 -112
  86. package/src/getUserInfoMain.js +64 -64
  87. package/src/getUserInfoV2.js +31 -31
  88. package/src/getUserInfoV3.js +62 -62
  89. package/src/getUserInfoV4.js +54 -54
  90. package/src/getUserInfoV5.js +60 -60
  91. package/src/handleFriendRequest.js +46 -46
  92. package/src/handleMessageRequest.js +49 -49
  93. package/src/httpGet.js +49 -49
  94. package/src/httpPost.js +48 -48
  95. package/src/httpPostFormData.js +40 -40
  96. package/src/listenMqtt.js +1 -956
  97. package/src/listenMqttV1.js +832 -846
  98. package/src/logout.js +68 -68
  99. package/src/markAsDelivered.js +48 -48
  100. package/src/markAsRead.js +70 -70
  101. package/src/markAsReadAll.js +42 -42
  102. package/src/markAsSeen.js +51 -51
  103. package/src/muteThread.js +47 -47
  104. package/src/notes.js +279 -0
  105. package/src/removeUserFromGroup.js +49 -49
  106. package/src/resolvePhotoUrl.js +37 -37
  107. package/src/searchForThread.js +43 -43
  108. package/src/sendMention.js +325 -0
  109. package/src/sendMessage.js +1 -386
  110. package/src/sendMqttMessage.js +70 -70
  111. package/src/sendTypingIndicator.js +79 -80
  112. package/src/setMessageReaction.js +109 -109
  113. package/src/setPostReaction.js +101 -101
  114. package/src/setTitle.js +74 -74
  115. package/src/share.js +98 -0
  116. package/src/shareContact.js +55 -55
  117. package/src/shareLink.js +58 -58
  118. package/src/stickers.js +525 -0
  119. package/src/story.js +267 -0
  120. package/src/threadColors.js +38 -38
  121. package/src/unfriend.js +43 -43
  122. package/src/unsendMessage.js +47 -47
  123. package/src/unsendMqttMessage.js +65 -65
  124. package/test/data/shareAttach.js +146 -146
  125. package/test/data/test.txt +7 -7
  126. package/test/example-config.json +18 -18
  127. package/test/test-page.js +140 -140
  128. package/test/test.js +385 -385
  129. package/test/testv2.js +2 -2
  130. package/userAgentManager.js +129 -0
  131. package/utils.js +1 -3077
  132. package/.github/workflows/publish.yml +0 -20
  133. package/Extra/Src/Release_Memory.js +0 -160
  134. package/Extra/Src/test.js +0 -28
  135. package/SECURITY.md +0 -17
@@ -1,67 +1,67 @@
1
- // module.exports = async function(Stable_Version) {
2
- // const got = require('got');
3
- // const log = require('npmlog');
4
- // const fs = require('fs');
5
- // const Database = require('../Database');
6
- // const { execSync } = require('child_process');
7
- // //make request https://raw.githubusercontent.com/KanzuXHorizon/Fca-Horizon-Remastered/main/package.json
8
- // const { body } = await got('https://raw.githubusercontent.com/KanzuXHorizon/Fca-Horizon-Remastered/main/package.json');
9
- // const json = JSON.parse(body);
10
- // const LocalVersion = require('../../package.json').version;
11
- // if (Number(LocalVersion.replace(/\./g,"")) < Number(json.version.replace(/\./g,"")) && global.Fca.Require.FastConfig.Stable_Version.Accept == false || Stable_Version && Number(LocalVersion.replace(/\./g,"")) != Number(Stable_Version.replace(/\./g,""))) {
12
- // var Version = Stable_Version != undefined ? Stable_Version : json.version;
13
- // log.warn("[ FCA-UPDATE ] •","New Version, Ready to Update: " + LocalVersion + " -> " + Version);
14
- // await new Promise(resolve => setTimeout(resolve, 3000));
15
- // try {
16
- // execSync(`npm install fca-horizon-remastered@${Version}`, { stdio: 'inherit' });
17
- // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
18
- // await new Promise(resolve => setTimeout(resolve, 3000));
19
- // Database().set("Instant_Update", Date.now());
20
- // await new Promise(resolve => setTimeout(resolve, 3000));
21
- // process.exit(1);
22
- // }
23
- // catch (err) {
24
- // try {
25
- // console.log(err);
26
- // log.warn("[ FCA-UPDATE ] •","Update Failed, Trying Another Method 1...");
27
- // await new Promise(resolve => setTimeout(resolve, 3000));
28
- // execSync(`npm install fca-horizon-remastered@${Version} --force`, { stdio: 'inherit' });
29
- // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
30
- // await new Promise(resolve => setTimeout(resolve, 3000));
31
- // Database().set("Instant_Update", Date.now());
32
- // await new Promise(resolve => setTimeout(resolve, 3000));
33
- // process.exit(1);
34
- // }
35
- // catch (err) {
36
- // try {
37
- // console.log(err);
38
- // log.warn("[ FCA-UPDATE ] •","Update Failed, Trying to clean Database() cache...");
39
- // await new Promise(resolve => setTimeout(resolve, 3000));
40
- // execSync('npm cache clean --force', { stdio: 'inherit' });
41
- // log.info("[ FCA-UPDATE ] •","Cache Cleaned, Trying Another Method 2...");
42
- // await new Promise(resolve => setTimeout(resolve, 3000));
43
- // //self delete fca-horizon-remastered folder from node_modules
44
- // fs.rmdirSync((process.cwd() + "/node_modules/fca-horizon-remastered" || __dirname + '../../../fca-horizon-remastered'), { recursive: true });
45
- // await new Promise(resolve => setTimeout(resolve, 3000));
46
- // execSync(`npm install fca-horizon-remastered@${Version}`, { stdio: 'inherit' });
47
- // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
48
- // await new Promise(resolve => setTimeout(resolve, 3000));
49
- // Database().set("Instant_Update", Date.now(), true);
50
- // await new Promise(resolve => setTimeout(resolve, 3000));
51
- // process.exit(1);
52
- // }
53
- // catch (e) {
54
- // console.log(e);
55
- // log.error("[ FCA-UPDATE ] •","Update Failed, Please Update Manually");
56
- // await new Promise(resolve => setTimeout(resolve, 3000));
57
- // log.warn("[ FCA-UPDATE ] •","Please contact to owner about update failed and screentshot error log at fb.com/Lazic.Kanzu");
58
- // await new Promise(resolve => setTimeout(resolve, 3000));
59
- // process.exit(1);
60
- // }
61
- // }
62
- // }
63
- // }
64
- // else {
65
- // return Database().set("NeedRebuild", false, true);
66
- // }
1
+ // module.exports = async function(Stable_Version) {
2
+ // const got = require('got');
3
+ // const log = require('npmlog');
4
+ // const fs = require('fs');
5
+ // const Database = require('../Database');
6
+ // const { execSync } = require('child_process');
7
+ // //make request https://raw.githubusercontent.com/KanzuXPriyanshFca/Fca-PriyanshFca-Remastered/main/package.json
8
+ // const { body } = await got('https://raw.githubusercontent.com/KanzuXPriyanshFca/Fca-PriyanshFca-Remastered/main/package.json');
9
+ // const json = JSON.parse(body);
10
+ // const LocalVersion = require('../../package.json').version;
11
+ // if (Number(LocalVersion.replace(/\./g,"")) < Number(json.version.replace(/\./g,"")) && global.Fca.Require.FastConfig.Stable_Version.Accept == false || Stable_Version && Number(LocalVersion.replace(/\./g,"")) != Number(Stable_Version.replace(/\./g,""))) {
12
+ // var Version = Stable_Version != undefined ? Stable_Version : json.version;
13
+ // log.warn("[ FCA-UPDATE ] •","New Version, Ready to Update: " + LocalVersion + " -> " + Version);
14
+ // await new Promise(resolve => setTimeout(resolve, 3000));
15
+ // try {
16
+ // execSync(`npm install fca-PriyanshFca-remastered@${Version}`, { stdio: 'inherit' });
17
+ // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
18
+ // await new Promise(resolve => setTimeout(resolve, 3000));
19
+ // Database().set("Instant_Update", Date.now());
20
+ // await new Promise(resolve => setTimeout(resolve, 3000));
21
+ // process.exit(1);
22
+ // }
23
+ // catch (err) {
24
+ // try {
25
+ // console.log(err);
26
+ // log.warn("[ FCA-UPDATE ] •","Update Failed, Trying Another Method 1...");
27
+ // await new Promise(resolve => setTimeout(resolve, 3000));
28
+ // execSync(`npm install fca-PriyanshFca-remastered@${Version} --force`, { stdio: 'inherit' });
29
+ // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
30
+ // await new Promise(resolve => setTimeout(resolve, 3000));
31
+ // Database().set("Instant_Update", Date.now());
32
+ // await new Promise(resolve => setTimeout(resolve, 3000));
33
+ // process.exit(1);
34
+ // }
35
+ // catch (err) {
36
+ // try {
37
+ // console.log(err);
38
+ // log.warn("[ FCA-UPDATE ] •","Update Failed, Trying to clean Database() cache...");
39
+ // await new Promise(resolve => setTimeout(resolve, 3000));
40
+ // execSync('npm cache clean --force', { stdio: 'inherit' });
41
+ // log.info("[ FCA-UPDATE ] •","Cache Cleaned, Trying Another Method 2...");
42
+ // await new Promise(resolve => setTimeout(resolve, 3000));
43
+ // //self delete fca-PriyanshFca-remastered folder from node_modules
44
+ // fs.rmdirSync((process.cwd() + "/node_modules/fca-PriyanshFca-remastered" || __dirname + '../../../fca-PriyanshFca-remastered'), { recursive: true });
45
+ // await new Promise(resolve => setTimeout(resolve, 3000));
46
+ // execSync(`npm install fca-PriyanshFca-remastered@${Version}`, { stdio: 'inherit' });
47
+ // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
48
+ // await new Promise(resolve => setTimeout(resolve, 3000));
49
+ // Database().set("Instant_Update", Date.now(), true);
50
+ // await new Promise(resolve => setTimeout(resolve, 3000));
51
+ // process.exit(1);
52
+ // }
53
+ // catch (e) {
54
+ // console.log(e);
55
+ // log.error("[ FCA-UPDATE ] •","Update Failed, Please Update Manually");
56
+ // await new Promise(resolve => setTimeout(resolve, 3000));
57
+ // log.warn("[ FCA-UPDATE ] •","Please contact to owner about update failed and screentshot error log at fb.com/Lazic.Kanzu");
58
+ // await new Promise(resolve => setTimeout(resolve, 3000));
59
+ // process.exit(1);
60
+ // }
61
+ // }
62
+ // }
63
+ // }
64
+ // else {
65
+ // return Database().set("NeedRebuild", false, true);
66
+ // }
67
67
  // }
@@ -1,115 +1,115 @@
1
- /**
2
- * Console History v1.5.1
3
- * console-history.js
4
- *
5
- * Licensed under the MIT License.
6
- * https://git.io/console
7
- */
8
- 'use strict'
9
-
10
- /* Allow only one instance of console-history.js */
11
- if (typeof console.history !== 'undefined') {
12
- throw new Error('Only one instance of console-history.js can run at a time.')
13
- }
14
-
15
- /* Store the original log functions. */
16
- console._log = console.log
17
- console._info = console.info
18
- console._warn = console.warn
19
- console._error = console.error
20
- console._debug = console.debug
21
-
22
- /* Declare our console history variable. */
23
- console.history = []
24
-
25
- /* Redirect all calls to the collector. */
26
- console.log = function(dt) {
27
- return console._intercept('log', dt, arguments)
28
- }
29
- console.info = function(dt) {
30
- return console._intercept('info', dt, arguments)
31
- }
32
- console.warn = function(dt) {
33
- return console._intercept('warn', dt, arguments)
34
- }
35
- console.error = function(dt) {
36
- return console._intercept('error', dt, arguments)
37
- }
38
- console.debug = function(dt) {
39
- return console._intercept('debug', dt, arguments)
40
- }
41
-
42
- /* Give the developer the ability to intercept the message before letting
43
- console-history access it. */
44
- console._intercept = function(type, data, args) {
45
- // Your own code can go here, but the preferred method is to override this
46
- // function in your own script, and add the line below to the end or
47
- // begin of your own 'console._intercept' function.
48
- // REMEMBER: Use only underscore console commands inside _intercept!
49
- console._collect(type, data,args)
50
- }
51
-
52
- /* Define the main log catcher. */
53
- console._collect = function(type, data, args) {
54
- // WARNING: When debugging this function, DO NOT call a modified console.log
55
- // function, all hell will break loose.
56
- // Instead use the original console._log functions.
57
-
58
- // All the arguments passed to any function, even when not defined
59
- // inside the function declaration, are stored and locally available in
60
- // the variable called 'arguments'.
61
- //
62
- // The arguments of the original console.log functions are collected above,
63
- // and passed to this function as a variable 'args', since 'arguments' is
64
- // reserved for the current function.
65
-
66
- // Collect the timestamp of the console log.
67
- const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' };
68
-
69
- var time = new Date().toLocaleDateString('vi-VN', options)
70
-
71
- // Make sure the 'type' parameter is set. If no type is set, we fall
72
- // back to the default log type.
73
- if (!type) type = 'log'
74
-
75
- // To ensure we behave like the original console log functions, we do not
76
- // output anything if no arguments are provided.
77
- if (!args || args.length === 0) return
78
-
79
- // Act normal, and just pass all original arguments to
80
- // the origial console function :)
81
- console['_' + type].apply(console, args)
82
-
83
- // Get stack trace information. By throwing an error, we get access to
84
- // a stack trace. We then go up in the trace tree and filter out
85
- // irrelevant information.
86
- var stack = false
87
- try {
88
- throw Error('')
89
- } catch (error) {
90
- // The lines containing 'console-history.js' are not relevant to us.
91
- var stackParts = error.stack.split('\n')
92
- stack = []
93
- for (var i = 0; i < stackParts.length; i++) {
94
- if (stackParts[i].indexOf('console-history.js') > -1 ||
95
- stackParts[i].indexOf('console-history.min.js') > -1 ||
96
- stackParts[i] === 'Error') {
97
- continue
98
- }
99
- stack.push(stackParts[i].trim())
100
- }
101
- }
102
- try {
103
- data = data.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,'')
104
- }
105
- catch (e) {
106
- data = data;
107
- }
108
- // Add the log to our history.
109
- console.history.push({
110
- type: type,
111
- timestamp: time,
112
- message: data,
113
- stack: stack
114
- })
1
+ /**
2
+ * Console History v1.5.1
3
+ * console-history.js
4
+ *
5
+ * Licensed under the MIT License.
6
+ * https://git.io/console
7
+ */
8
+ 'use strict'
9
+
10
+ /* Allow only one instance of console-history.js */
11
+ if (typeof console.history !== 'undefined') {
12
+ throw new Error('Only one instance of console-history.js can run at a time.')
13
+ }
14
+
15
+ /* Store the original log functions. */
16
+ console._log = console.log
17
+ console._info = console.info
18
+ console._warn = console.warn
19
+ console._error = console.error
20
+ console._debug = console.debug
21
+
22
+ /* Declare our console history variable. */
23
+ console.history = []
24
+
25
+ /* Redirect all calls to the collector. */
26
+ console.log = function(dt) {
27
+ return console._intercept('log', dt, arguments)
28
+ }
29
+ console.info = function(dt) {
30
+ return console._intercept('info', dt, arguments)
31
+ }
32
+ console.warn = function(dt) {
33
+ return console._intercept('warn', dt, arguments)
34
+ }
35
+ console.error = function(dt) {
36
+ return console._intercept('error', dt, arguments)
37
+ }
38
+ console.debug = function(dt) {
39
+ return console._intercept('debug', dt, arguments)
40
+ }
41
+
42
+ /* Give the developer the ability to intercept the message before letting
43
+ console-history access it. */
44
+ console._intercept = function(type, data, args) {
45
+ // Your own code can go here, but the preferred method is to override this
46
+ // function in your own script, and add the line below to the end or
47
+ // begin of your own 'console._intercept' function.
48
+ // REMEMBER: Use only underscore console commands inside _intercept!
49
+ console._collect(type, data,args)
50
+ }
51
+
52
+ /* Define the main log catcher. */
53
+ console._collect = function(type, data, args) {
54
+ // WARNING: When debugging this function, DO NOT call a modified console.log
55
+ // function, all hell will break loose.
56
+ // Instead use the original console._log functions.
57
+
58
+ // All the arguments passed to any function, even when not defined
59
+ // inside the function declaration, are stored and locally available in
60
+ // the variable called 'arguments'.
61
+ //
62
+ // The arguments of the original console.log functions are collected above,
63
+ // and passed to this function as a variable 'args', since 'arguments' is
64
+ // reserved for the current function.
65
+
66
+ // Collect the timestamp of the console log.
67
+ const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' };
68
+
69
+ var time = new Date().toLocaleDateString('vi-VN', options)
70
+
71
+ // Make sure the 'type' parameter is set. If no type is set, we fall
72
+ // back to the default log type.
73
+ if (!type) type = 'log'
74
+
75
+ // To ensure we behave like the original console log functions, we do not
76
+ // output anything if no arguments are provided.
77
+ if (!args || args.length === 0) return
78
+
79
+ // Act normal, and just pass all original arguments to
80
+ // the origial console function :)
81
+ console['_' + type].apply(console, args)
82
+
83
+ // Get stack trace information. By throwing an error, we get access to
84
+ // a stack trace. We then go up in the trace tree and filter out
85
+ // irrelevant information.
86
+ var stack = false
87
+ try {
88
+ throw Error('')
89
+ } catch (error) {
90
+ // The lines containing 'console-history.js' are not relevant to us.
91
+ var stackParts = error.stack.split('\n')
92
+ stack = []
93
+ for (var i = 0; i < stackParts.length; i++) {
94
+ if (stackParts[i].indexOf('console-history.js') > -1 ||
95
+ stackParts[i].indexOf('console-history.min.js') > -1 ||
96
+ stackParts[i] === 'Error') {
97
+ continue
98
+ }
99
+ stack.push(stackParts[i].trim())
100
+ }
101
+ }
102
+ try {
103
+ data = data.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,'')
104
+ }
105
+ catch (e) {
106
+ data = data;
107
+ }
108
+ // Add the log to our history.
109
+ console.history.push({
110
+ type: type,
111
+ timestamp: time,
112
+ message: data,
113
+ stack: stack
114
+ })
115
115
  }
@@ -1,65 +1,65 @@
1
- // module.exports = async function() {
2
- // const got = require('got');
3
- // const log = require('npmlog');
4
- // const fs = require('fs');
5
- // const Database = require('../Database')
6
- // const { execSync } = require('child_process');
7
- // //make request https://raw.githubusercontent.com/KanzuXHorizon/Fca-Horizon-Remastered/main/package.json
8
- // const { body } = await got('https://raw.githubusercontent.com/KanzuXHorizon/Global_Horizon/main/InstantAction.json');
9
- // const json = JSON.parse(body);
10
- // const LocalVersion = require('../../package.json').version;
11
- // if (Number(LocalVersion.replace(/\./g,"")) < Number(json.Version.replace(/\./g,"")) ) {
12
- // log.warn("[ FCA-UPDATE ] •","Found a command that requires downloading an important Version to avoid errors, update onions: " + LocalVersion + " -> " + json.Version);
13
- // log.warn("[ FCA-UPDATE ] •","Problem Description: " + json.Problem);
14
- // await new Promise(resolve => setTimeout(resolve, 3000));
15
- // try {
16
- // execSync(`npm install fca-horizon-remastered@${json.Version}`, { stdio: 'inherit' });
17
- // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
18
- // await new Promise(resolve => setTimeout(resolve, 3000));
19
- // Database(true).set("Instant_Update", Date.now(), true);
20
- // await new Promise(resolve => setTimeout(resolve, 3000));
21
- // process.exit(1);
22
- // }
23
- // catch (err) {
24
- // try {
25
- // log.warn("[ FCA-UPDATE ] •","Update Failed, Trying Another Method 1...");
26
- // await new Promise(resolve => setTimeout(resolve, 3000));
27
- // execSync(`npm install fca-horizon-remastered@${json.Version} --force`, { stdio: 'inherit' });
28
- // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
29
- // await new Promise(resolve => setTimeout(resolve, 3000));
30
- // Database(true).set("Instant_Update", Date.now());
31
- // await new Promise(resolve => setTimeout(resolve, 3000));
32
- // process.exit(1);
33
- // }
34
- // catch (err) {
35
- // try {
36
- // log.warn("[ FCA-UPDATE ] •","Update Failed, Trying to clean package cache...");
37
- // await new Promise(resolve => setTimeout(resolve, 3000));
38
- // execSync('npm cache clean --force', { stdio: 'inherit' });
39
- // log.info("[ FCA-UPDATE ] •","Cache Cleaned, Trying Another Method 2...");
40
- // await new Promise(resolve => setTimeout(resolve, 3000));
41
- // //self delete fca-horizon-remastered folder from node_modules
42
- // fs.rmdirSync((process.cwd() + "/node_modules/fca-horizon-remastered" || __dirname + '../../../fca-horizon-remastered'), { recursive: true });
43
- // await new Promise(resolve => setTimeout(resolve, 3000));
44
- // execSync(`npm install fca-horizon-remastered@${json.Version}`, { stdio: 'inherit' });
45
- // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
46
- // await new Promise(resolve => setTimeout(resolve, 3000));
47
- // Database(true).set("Instant_Update", Date.now());
48
- // await new Promise(resolve => setTimeout(resolve, 3000));
49
- // process.exit(1);
50
- // }
51
- // catch (e) {
52
- // console.log(e);
53
- // log.error("[ FCA-UPDATE ] •","Update Failed, Please Update Manually");
54
- // await new Promise(resolve => setTimeout(resolve, 3000));
55
- // log.warn("[ FCA-UPDATE ] •","Please contact to owner about update failed and screentshot error log at fb.com/Lazic.Kanzu");
56
- // await new Promise(resolve => setTimeout(resolve, 3000));
57
- // process.exit(1);
58
- // }
59
- // }
60
- // }
61
- // }
62
- // else {
63
- // return Database(true).set("NeedRebuild", false);
64
- // }
1
+ // module.exports = async function() {
2
+ // const got = require('got');
3
+ // const log = require('npmlog');
4
+ // const fs = require('fs');
5
+ // const Database = require('../Database')
6
+ // const { execSync } = require('child_process');
7
+ // //make request https://raw.githubusercontent.com/KanzuXPriyanshFca/Fca-PriyanshFca-Remastered/main/package.json
8
+ // const { body } = await got('https://raw.githubusercontent.com/KanzuXPriyanshFca/Global_PriyanshFca/main/InstantAction.json');
9
+ // const json = JSON.parse(body);
10
+ // const LocalVersion = require('../../package.json').version;
11
+ // if (Number(LocalVersion.replace(/\./g,"")) < Number(json.Version.replace(/\./g,"")) ) {
12
+ // log.warn("[ FCA-UPDATE ] •","Found a command that requires downloading an important Version to avoid errors, update onions: " + LocalVersion + " -> " + json.Version);
13
+ // log.warn("[ FCA-UPDATE ] •","Problem Description: " + json.Problem);
14
+ // await new Promise(resolve => setTimeout(resolve, 3000));
15
+ // try {
16
+ // execSync(`npm install fca-PriyanshFca-remastered@${json.Version}`, { stdio: 'inherit' });
17
+ // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
18
+ // await new Promise(resolve => setTimeout(resolve, 3000));
19
+ // Database(true).set("Instant_Update", Date.now(), true);
20
+ // await new Promise(resolve => setTimeout(resolve, 3000));
21
+ // process.exit(1);
22
+ // }
23
+ // catch (err) {
24
+ // try {
25
+ // log.warn("[ FCA-UPDATE ] •","Update Failed, Trying Another Method 1...");
26
+ // await new Promise(resolve => setTimeout(resolve, 3000));
27
+ // execSync(`npm install fca-PriyanshFca-remastered@${json.Version} --force`, { stdio: 'inherit' });
28
+ // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
29
+ // await new Promise(resolve => setTimeout(resolve, 3000));
30
+ // Database(true).set("Instant_Update", Date.now());
31
+ // await new Promise(resolve => setTimeout(resolve, 3000));
32
+ // process.exit(1);
33
+ // }
34
+ // catch (err) {
35
+ // try {
36
+ // log.warn("[ FCA-UPDATE ] •","Update Failed, Trying to clean package cache...");
37
+ // await new Promise(resolve => setTimeout(resolve, 3000));
38
+ // execSync('npm cache clean --force', { stdio: 'inherit' });
39
+ // log.info("[ FCA-UPDATE ] •","Cache Cleaned, Trying Another Method 2...");
40
+ // await new Promise(resolve => setTimeout(resolve, 3000));
41
+ // //self delete fca-PriyanshFca-remastered folder from node_modules
42
+ // fs.rmdirSync((process.cwd() + "/node_modules/fca-PriyanshFca-remastered" || __dirname + '../../../fca-PriyanshFca-remastered'), { recursive: true });
43
+ // await new Promise(resolve => setTimeout(resolve, 3000));
44
+ // execSync(`npm install fca-PriyanshFca-remastered@${json.Version}`, { stdio: 'inherit' });
45
+ // log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
46
+ // await new Promise(resolve => setTimeout(resolve, 3000));
47
+ // Database(true).set("Instant_Update", Date.now());
48
+ // await new Promise(resolve => setTimeout(resolve, 3000));
49
+ // process.exit(1);
50
+ // }
51
+ // catch (e) {
52
+ // console.log(e);
53
+ // log.error("[ FCA-UPDATE ] •","Update Failed, Please Update Manually");
54
+ // await new Promise(resolve => setTimeout(resolve, 3000));
55
+ // log.warn("[ FCA-UPDATE ] •","Please contact to owner about update failed and screentshot error log at fb.com/Lazic.Kanzu");
56
+ // await new Promise(resolve => setTimeout(resolve, 3000));
57
+ // process.exit(1);
58
+ // }
59
+ // }
60
+ // }
61
+ // }
62
+ // else {
63
+ // return Database(true).set("NeedRebuild", false);
64
+ // }
65
65
  // }
@@ -1,65 +1,65 @@
1
- /* eslint-disable linebreak-style */
2
- 'use strict';
3
-
4
- var assert = require('assert');
5
-
6
- var runtimes = new WeakMap();
7
-
8
- /**
9
- * @param {any} fn
10
- */
11
- function isFunction(fn) {
12
- return typeof fn === 'function';
13
- }
14
-
15
- /**
16
- * @param {object} fn
17
- * @param {string} timeResolution
18
- */
19
- function lastRun(fn, timeResolution) {
20
- assert(isFunction(fn), 'Only functions can check lastRun');
21
-
22
- var time = runtimes.get(fn);
23
-
24
- if (time == null) {
25
- return;
26
- }
27
-
28
- var resolution = parseInt(timeResolution, 10) || 1;
29
- return time - (time % resolution);
30
- }
31
-
32
- /**
33
- * @param {object} fn
34
- * @param {number} timestamp
35
- */
36
- function capture(fn, timestamp) {
37
- assert(isFunction(fn), 'Only functions can be captured');
38
-
39
- timestamp = timestamp || Date.now();
40
-
41
- runtimes.set(fn, timestamp);
42
- }
43
-
44
- /**
45
- * @param {object} name
46
- */
47
- function has(name) {
48
- return runtimes.has(name);
49
- }
50
-
51
- /**
52
- * @param {object} fn
53
- */
54
- function release(fn) {
55
- assert(isFunction(fn), 'Only functions can be captured');
56
-
57
- runtimes.delete(fn);
58
- }
59
-
60
- module.exports = {
61
- lastRun,
62
- capture,
63
- release,
64
- has
1
+ /* eslint-disable linebreak-style */
2
+ 'use strict';
3
+
4
+ var assert = require('assert');
5
+
6
+ var runtimes = new WeakMap();
7
+
8
+ /**
9
+ * @param {any} fn
10
+ */
11
+ function isFunction(fn) {
12
+ return typeof fn === 'function';
13
+ }
14
+
15
+ /**
16
+ * @param {object} fn
17
+ * @param {string} timeResolution
18
+ */
19
+ function lastRun(fn, timeResolution) {
20
+ assert(isFunction(fn), 'Only functions can check lastRun');
21
+
22
+ var time = runtimes.get(fn);
23
+
24
+ if (time == null) {
25
+ return;
26
+ }
27
+
28
+ var resolution = parseInt(timeResolution, 10) || 1;
29
+ return time - (time % resolution);
30
+ }
31
+
32
+ /**
33
+ * @param {object} fn
34
+ * @param {number} timestamp
35
+ */
36
+ function capture(fn, timestamp) {
37
+ assert(isFunction(fn), 'Only functions can be captured');
38
+
39
+ timestamp = timestamp || Date.now();
40
+
41
+ runtimes.set(fn, timestamp);
42
+ }
43
+
44
+ /**
45
+ * @param {object} name
46
+ */
47
+ function has(name) {
48
+ return runtimes.has(name);
49
+ }
50
+
51
+ /**
52
+ * @param {object} fn
53
+ */
54
+ function release(fn) {
55
+ assert(isFunction(fn), 'Only functions can be captured');
56
+
57
+ runtimes.delete(fn);
58
+ }
59
+
60
+ module.exports = {
61
+ lastRun,
62
+ capture,
63
+ release,
64
+ has
65
65
  };