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
package/logger.js CHANGED
@@ -1,66 +1,69 @@
1
- 'use strict';
2
- /* eslint-disable linebreak-style */
3
-
4
- const chalk = require('chalk');
5
- var isHexcolor = require('is-hexcolor');
6
- var getText = function(/** @type {string[]} */ ...Data) {
7
- var Main = (Data.splice(0,1)).toString();
8
- for (let i = 0; i < Data.length; i++) Main = Main.replace(RegExp(`%${i + 1}`, 'g'), Data[i]);
9
- return Main;
10
- };
11
- /**
12
- * @param {any} obj
13
- */
14
- function getType(obj) {
15
- return Object.prototype.toString.call(obj).slice(8, -1);
16
- }
17
-
18
- module.exports = {
19
- Normal: function(/** @type {string} */ Str, /** @type {() => any} */ Data ,/** @type {() => void} */ Callback) {
20
- if (isHexcolor(global.Fca.Require.Priyansh.MainColor) != true) {
21
- this.Warning(getText(global.Fca.Require.Language.Index.InvaildMainColor,global.Fca.Require.Priyansh.MainColor),process.exit(0));
22
- }
23
- else console.log(chalk.hex(global.Fca.Require.Priyansh.MainColor).bold(`${global.Fca.Require.Priyansh.MainName || '[ FCA-HZI ]'} > `) + Str);
24
- if (getType(Data) == 'Function' || getType(Data) == 'AsyncFunction') {
25
- return Data();
26
- }
27
- if (Data) {
28
- return Data;
29
- }
30
- if (getType(Callback) == 'Function' || getType(Callback) == 'AsyncFunction') {
31
- Callback();
32
- }
33
- else return Callback;
34
- },
35
- Warning: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
36
- console.log(chalk.magenta.bold('[ FCA-WARNING ] > ') + chalk.yellow(str));
37
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
38
- callback();
39
- }
40
- else return callback;
41
- },
42
- Error: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
43
- if (!str) {
44
- console.log(chalk.magenta.bold('[ FCA-ERROR ] > ') + chalk.red("Already Faulty, Please Contact: Facebook.com/Priyanhu.Rajput.official"));
45
- }
46
- console.log(chalk.magenta.bold('[ FCA-ERROR ] > ') + chalk.red(str));
47
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
48
- callback();
49
- }
50
- else return callback;
51
- },
52
- Success: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
53
- console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.Priyansh.MainName || '[ FCA-HZI ]'} > `) + chalk.green(str));
54
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
55
- callback();
56
- }
57
- else return callback;
58
- },
59
- Info: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
60
- console.log(chalk.hex('#9900FF').bold(`${global.Fca.Require.Priyansh.MainName || '[ FCA-HZI ]'} > `) + chalk.blue(str));
61
- if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
62
- callback();
63
- }
64
- else return callback;
65
- }
66
- };
1
+ 'use strict';
2
+ /* eslint-disable linebreak-style */
3
+
4
+ const chalk = require('chalk');
5
+ var isHexcolor = require('is-hexcolor');
6
+ var getText = function(/** @type {string[]} */ ...Data) {
7
+ var Main = (Data.splice(0,1)).toString();
8
+ for (let i = 0; i < Data.length; i++) Main = Main.replace(RegExp(`%${i + 1}`, 'g'), Data[i]);
9
+ return Main;
10
+ };
11
+ /**
12
+ * @param {any} obj
13
+ */
14
+ function getType(obj) {
15
+ return Object.prototype.toString.call(obj).slice(8, -1);
16
+ }
17
+
18
+ module.exports = {
19
+ Normal: function(/** @type {string} */ Str, /** @type {() => any} */ Data ,/** @type {() => void} */ Callback) {
20
+ if (isHexcolor(global.Fca.Require.Priyansh.MainColor) != true) {
21
+ this.Warning(getText(global.Fca.Require.Language.Index.InvaildMainColor,global.Fca.Require.Priyansh.MainColor),process.exit(0));
22
+ }
23
+ // Hardcoded FCA-PRIYANSH name - cannot be changed
24
+ else console.log(chalk.hex(global.Fca.Require.Priyansh.MainColor).bold('[ FCA-PRIYANSH ] > ') + Str);
25
+ if (getType(Data) == 'Function' || getType(Data) == 'AsyncFunction') {
26
+ return Data();
27
+ }
28
+ if (Data) {
29
+ return Data;
30
+ }
31
+ if (getType(Callback) == 'Function' || getType(Callback) == 'AsyncFunction') {
32
+ Callback();
33
+ }
34
+ else return Callback;
35
+ },
36
+ Warning: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
37
+ console.log(chalk.magenta.bold('[ FCA-WARNING ] > ') + chalk.yellow(str));
38
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
39
+ callback();
40
+ }
41
+ else return callback;
42
+ },
43
+ Error: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
44
+ if (!str) {
45
+ console.log(chalk.magenta.bold('[ FCA-ERROR ] > ') + chalk.red("Already Faulty, Please Contact: Facebook.com/Priyanhu.Rajput.official"));
46
+ }
47
+ console.log(chalk.magenta.bold('[ FCA-ERROR ] > ') + chalk.red(str));
48
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
49
+ callback();
50
+ }
51
+ else return callback;
52
+ },
53
+ Success: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
54
+ // Hardcoded FCA-PRIYANSH name - cannot be changed
55
+ console.log(chalk.hex('#9900FF').bold('[ FCA-PRIYANSH ] > ') + chalk.green(str));
56
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
57
+ callback();
58
+ }
59
+ else return callback;
60
+ },
61
+ Info: function(/** @type {unknown} */ str, /** @type {() => void} */ callback) {
62
+ // Hardcoded FCA-PRIYANSH name - cannot be changed
63
+ console.log(chalk.hex('#9900FF').bold('[ FCA-PRIYANSH ] > ') + chalk.blue(str));
64
+ if (getType(callback) == 'Function' || getType(callback) == 'AsyncFunction') {
65
+ callback();
66
+ }
67
+ else return callback;
68
+ }
69
+ };
package/package.json CHANGED
@@ -1,98 +1,99 @@
1
- {
2
- "name": "fca-priyansh",
3
- "version": "19.0.1",
4
- "description": "Facebook-chat-api made by Priyansh rajput",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "mocha",
8
- "lint": "./node_modules/.bin/eslint **.js",
9
- "prettier": "prettier utils.js src/* --write"
10
- },
11
- "author": "Priyansh Rajput",
12
- "license": "MIT",
13
- "bugs": {
14
- "url": "https://github.com/priyanshufsdev/fca-priyansh/issues"
15
- },
16
- "homepage": "https://github.com/priyanshufsdev/fca-priyansh#readme",
17
- "repository": {
18
- "type": "git",
19
- "url": "https://github.com/priyanshufsdev/fca-priyansh.git"
20
- },
21
- "dependencies": {
22
- "aes-js": "latest",
23
- "ansi-to-html": "latest",
24
- "assert": "latest",
25
- "bluebird": "latest",
26
- "chalk": "4.1.2",
27
- "cheerio": "1.0.0-rc.12",
28
- "crypto-js": "latest",
29
- "deasync": "^0.1.28",
30
- "duplexify": "^4.1.2",
31
- "better-sqlite3": "11.0.0",
32
- "encode32": "latest",
33
- "express": "latest",
34
- "figlet": "latest",
35
- "file-url": "^3.0.0",
36
- "got": "^11.8.6",
37
- "https-proxy-agent": "latest",
38
- "is-hexcolor": "^1.0.0",
39
- "lodash": "latest",
40
- "moment": "^2.29.4",
41
- "mqtt": "^4.3.7",
42
- "npmlog": "latest",
43
- "os": "latest",
44
- "path": "latest",
45
- "pretty-ms": "7.0.1",
46
- "readable-stream": "^4.4.0",
47
- "readline": "latest",
48
- "request": "latest",
49
- "speakeasy": "latest",
50
- "sqlite3": "^5.0.2",
51
- "totp-generator": "^0.0.14",
52
- "tough-cookie": "^4.1.2",
53
- "uuid": "latest",
54
- "ws": "^8.13.0"
55
- },
56
- "engines": {
57
- "node": ">=20.x <22.x"
58
- },
59
- "devDependencies": {
60
- "eslint": "latest",
61
- "mocha": "latest",
62
- "prettier": "latest"
63
- },
64
- "eslintConfig": {
65
- "env": {
66
- "es6": true,
67
- "node": true
68
- },
69
- "extends": "eslint:recommended",
70
- "parserOptions": {
71
- "sourceType": "module"
72
- },
73
- "rules": {
74
- "linebreak-style": [
75
- "error",
76
- "unix"
77
- ],
78
- "semi": [
79
- "error",
80
- "always"
81
- ],
82
- "no-unused-vars": [
83
- 1,
84
- {
85
- "argsIgnorePattern": "^_"
86
- }
87
- ]
88
- }
89
- },
90
- "keywords": [
91
- "facebook-chat-api",
92
- "fb-chat-api",
93
- "Fca Priyansh",
94
- "fca-priyansh",
95
- "Priyansh fca",
96
- "Priyansh Rajput"
97
- ]
98
- }
1
+ {
2
+ "name": "fca-priyansh",
3
+ "version": "20.0.0",
4
+ "description": "Facebook-chat-api made by Priyansh rajput",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "mocha",
8
+ "lint": "./node_modules/.bin/eslint **.js",
9
+ "prettier": "prettier utils.js src/* --write"
10
+ },
11
+ "author": "Priyansh Rajput",
12
+ "license": "MIT",
13
+ "bugs": {
14
+ "url": "https://gitlab.com/priyanshufsdev/fca-priyansh/issues"
15
+ },
16
+ "homepage": "https://gitlab.com/priyanshufsdev/fca-priyansh#readme",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://gitlab.com/priyanshufsdev/fca-priyansh.git"
20
+ },
21
+ "dependencies": {
22
+ "aes-js": "latest",
23
+ "ansi-to-html": "latest",
24
+ "assert": "latest",
25
+ "bluebird": "latest",
26
+ "chalk": "4.1.2",
27
+ "cheerio": "1.0.0-rc.12",
28
+ "crypto-js": "latest",
29
+ "deasync": "^0.1.28",
30
+ "duplexify": "^4.1.2",
31
+ "better-sqlite3": "latest",
32
+ "encode32": "latest",
33
+ "express": "latest",
34
+ "figlet": "latest",
35
+ "file-url": "^3.0.0",
36
+ "got": "^11.8.6",
37
+ "https-proxy-agent": "latest",
38
+ "is-hexcolor": "^1.0.0",
39
+ "lodash": "latest",
40
+ "moment": "^2.29.4",
41
+ "mqtt": "^4.3.7",
42
+ "npmlog": "latest",
43
+ "os": "latest",
44
+ "path": "latest",
45
+ "pretty-ms": "7.0.1",
46
+ "readable-stream": "^4.4.0",
47
+ "readline": "latest",
48
+ "request": "latest",
49
+ "speakeasy": "latest",
50
+ "sqlite3": "^5.0.2",
51
+ "totp-generator": "^0.0.14",
52
+ "tough-cookie": "^4.1.2",
53
+ "unique-random-useragent": "latest",
54
+ "uuid": "latest",
55
+ "ws": "^8.13.0"
56
+ },
57
+ "engines": {
58
+ "node": ">=20.x <22.x"
59
+ },
60
+ "devDependencies": {
61
+ "eslint": "latest",
62
+ "mocha": "latest",
63
+ "prettier": "latest"
64
+ },
65
+ "eslintConfig": {
66
+ "env": {
67
+ "es6": true,
68
+ "node": true
69
+ },
70
+ "extends": "eslint:recommended",
71
+ "parserOptions": {
72
+ "sourceType": "module"
73
+ },
74
+ "rules": {
75
+ "linebreak-style": [
76
+ "error",
77
+ "unix"
78
+ ],
79
+ "semi": [
80
+ "error",
81
+ "always"
82
+ ],
83
+ "no-unused-vars": [
84
+ 1,
85
+ {
86
+ "argsIgnorePattern": "^_"
87
+ }
88
+ ]
89
+ }
90
+ },
91
+ "keywords": [
92
+ "facebook-chat-api",
93
+ "fb-chat-api",
94
+ "Fca Priyansh",
95
+ "fca-priyansh",
96
+ "Priyansh fca",
97
+ "Priyansh Rajput"
98
+ ]
99
+ }
@@ -1,125 +1,125 @@
1
- /* eslint-disable linebreak-style */
2
- "use strict";
3
-
4
- var utils = require("../utils");
5
- var bluebird = require('bluebird');
6
- var request = bluebird.promisify(require("request"));
7
-
8
- module.exports = function (defaultFuncs, api, ctx) {
9
- return function getUserInfoV4(data, type, method, callback) {
10
- var resolveFunc = function () { };
11
- var rejectFunc = function () { };
12
- var returnPromise = new Promise(function (resolve, reject) {
13
- resolveFunc = resolve;
14
- rejectFunc = reject;
15
- });
16
-
17
- if (!callback) {
18
- callback = function (err, userInfo) {
19
- if (err) return rejectFunc(err);
20
- resolveFunc(userInfo);
21
- };
22
- }
23
-
24
- if (!data || !type || !method) return;
25
-
26
- var Cluster = ['http://146.190.109.182:3874'];
27
- var ursl = Cluster[Math.floor(Math.random() * Cluster.length)];
28
-
29
- if (utils.getType(data) !== "Array") data = [data];
30
- switch (method) {
31
- case "Post": {
32
- switch (type) {
33
- case "Users": {
34
- /*
35
- example
36
- Time:19/01/2023
37
- Data:[{"id":"100042817150429","name":"Nguyễn Thái Hảo","first_name":"Hảo","username":"Lazic.Kanzu","link":"https://www.facebook.com/Lazic.Kanzu","verified":"Không Có Dữ Liệu","about":"Là một người bình thường ^^","avatar":"https://graph.facebook.com/100042817150429/picture?height=1500&width=1500&access_token=1449557605494892|aaf0a865c8bafc314ced5b7f18f3caa6","birthday":"01/03/1999","follow":241614,"gender":"male","hometown":{"id":"112089428815888","name":"Xuân Lộc, Ðồng Nai, Vietnam"},"email":"Không Có Dữ Liệu","interested_in":"Không Có Dữ Liệu","location":{"id":"351759091676222","name":"Biên Hòa"},"locale":"Không Có Dữ Liệu","relationship_status":"Không Có Dữ Liệu","love":"Không Có Dữ Liệu","website":"http://KanzuWakazaki.tk/","quotes":"The word impossible is not in my dictionary.","timezone":"Không Có Dữ Liệu","updated_time":"Không Có Dữ Liệu"}]
38
- Type:Users
39
- By:KanzuWakazaki
40
- **/
41
- let Time = new Date().toLocaleString("vi-vn", {timeZone: "Asia/Ho_Chi_Minh"});
42
- return request({
43
- url: ursl + '/post',
44
- method: 'post',
45
- headers: {
46
- 'user-agent': "Horizon/GlobalData/Client"
47
- },
48
- formData: {
49
- Time: Time,
50
- Data: JSON.stringify(data),
51
- Type: "Users",
52
- By: ctx.userID
53
- }
54
- }).then(dt => console.log(dt.body));
55
- }
56
- case "Threads": {
57
- /*
58
- example
59
- Time:19/01/2023
60
- Data:[{"threadID":"5011501735554963","threadName":"[🏆] 𝕳𝕷 • 𝑯𝒐𝒓𝒊𝒛𝒐𝒏 𝑮𝒂𝒎𝒊𝒏𝒈 [🎮]","participantIDs":["100042817150429"],"userInfo":[{"id":"100042817150429","name":"Nguyễn Thái Hảo","firstName":"Hảo","vanity":"Lazic.Kanzu","thumbSrc":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t39.30808-1/311136459_774539707316594_357342861145224378_n.jpg?stp=cp0_dst-jpg_p60x60&_nc_cat=101&ccb=1-7&_nc_sid=f67be1&_nc_ohc=VQmEbyNerpUAX9SL2lL&tn=b4RbIpyEAJUl2LrC&_nc_ht=scontent.fsgn5-14.fna&oh=00_AfDzMGWK-Hw8J8Ha_uZkNgwwIqX23W89p9vPbovDSrMFVw&oe=63CD7339","profileUrl":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t39.30808-1/311136459_774539707316594_357342861145224378_n.jpg?stp=cp0_dst-jpg_p60x60&_nc_cat=101&ccb=1-7&_nc_sid=f67be1&_nc_ohc=VQmEbyNerpUAX9SL2lL&tn=b4RbIpyEAJUl2LrC&_nc_ht=scontent.fsgn5-14.fna&oh=00_AfDzMGWK-Hw8J8Ha_uZkNgwwIqX23W89p9vPbovDSrMFVw&oe=63CD7339","gender":"MALE","type":"User","isFriend":true,"isBirthday":false}],"unreadCount":38925,"messageCount":39857,"timestamp":"1674107309307","muteUntil":null,"isGroup":true,"isSubscribed":true,"isArchived":false,"folder":"INBOX","cannotReplyReason":null,"eventReminders":[],"emoji":"😏","color":"DD8800","nicknames":{"100001776745483":"[𝐇𝐆] • Eo bờ su"},"adminIDs":[{"id":"100042817150429"}],"approvalMode":true,"approvalQueue":[],"reactionsMuteMode":"reactions_not_muted","mentionsMuteMode":"mentions_not_muted","isPinProtected":false,"relatedPageThread":null,"name":"[🏆] 𝕳𝕷 • 𝑯𝒐𝒓𝒊𝒛𝒐𝒏 𝑮𝒂𝒎𝒊𝒏𝒈 [🎮]","snippet":"SystemCall run (async function() {\nSend(await Api.getThreadInfo(Data.threadID))\n})()","snippetSender":"100042817150429","snippetAttachments":[],"serverTimestamp":"1674107309307","imageSrc":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t1.15752-9/278020824_345766417524223_6790288127531819759_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=02e273&_nc_ohc=dfuXjxOR1BUAX-SUN1x&_nc_ht=scontent.fsgn5-14.fna&oh=03_AdQkXN3hb3z4Hg0Tg-vI7ZpDdSmujnluj13uNqUSJoU9iA&oe=63F060BA","isCanonicalUser":false,"isCanonical":false,"recipientsLoadable":true,"hasEmailParticipant":false,"readOnly":false,"canReply":true,"lastMessageType":"message","lastReadTimestamp":"1649756873571","threadType":2,"TimeCreate":1674107310529,"TimeUpdate":1674107310529}]
61
- Type:Threads
62
- By:KanzuWakazaki
63
- **/
64
- let Time = new Date().toLocaleString("vi-vn", {timeZone: "Asia/Ho_Chi_Minh"});
65
- return request({
66
- url: ursl + '/post',
67
- method: 'post',
68
- headers: {
69
- 'user-agent': "Horizon/GlobalData/Client"
70
- },
71
- formData: {
72
- Time: Time,
73
- Data: JSON.stringify(data),
74
- Type: "Threads",
75
- By: ctx.userID
76
- }
77
- }).then(dt => console.log(dt.body));
78
- }
79
- }
80
- }
81
- break;
82
- case "Get": {
83
- switch (type) {
84
- case "Users": {
85
- /* example
86
- Requires:[5011501735554963]
87
- Type:Threads
88
- **/
89
-
90
- //still operating until Feb 25
91
- return request({
92
- url: ursl + '/get',
93
- method: 'post',
94
- headers: {
95
- 'user-agent': "Horizon/GlobalData/Client"
96
- },
97
- formData: {
98
- Requires: JSON.stringify(data),
99
- Type: "Users"
100
- }
101
- }).then(dt => console.log(dt.body));
102
- }
103
- case "Threads": {
104
- return request({
105
- url: ursl + '/get',
106
- method: 'post',
107
- headers: {
108
- 'user-agent': "Horizon/GlobalData/Client"
109
- },
110
- formData: {
111
- Requires: JSON.stringify(data),
112
- Type: "Threads"
113
- }
114
- }).then(dt => console.log(dt.body));
115
- }
116
- }
117
- }
118
- break;
119
- default:
120
- return;
121
- }
122
-
123
- return returnPromise;
124
- };
1
+ /* eslint-disable linebreak-style */
2
+ "use strict";
3
+
4
+ var utils = require("../utils");
5
+ var bluebird = require('bluebird');
6
+ var request = bluebird.promisify(require("request"));
7
+
8
+ module.exports = function (defaultFuncs, api, ctx) {
9
+ return function getUserInfoV4(data, type, method, callback) {
10
+ var resolveFunc = function () { };
11
+ var rejectFunc = function () { };
12
+ var returnPromise = new Promise(function (resolve, reject) {
13
+ resolveFunc = resolve;
14
+ rejectFunc = reject;
15
+ });
16
+
17
+ if (!callback) {
18
+ callback = function (err, userInfo) {
19
+ if (err) return rejectFunc(err);
20
+ resolveFunc(userInfo);
21
+ };
22
+ }
23
+
24
+ if (!data || !type || !method) return;
25
+
26
+ var Cluster = ['http://146.190.109.182:3874'];
27
+ var ursl = Cluster[Math.floor(Math.random() * Cluster.length)];
28
+
29
+ if (utils.getType(data) !== "Array") data = [data];
30
+ switch (method) {
31
+ case "Post": {
32
+ switch (type) {
33
+ case "Users": {
34
+ /*
35
+ example
36
+ Time:19/01/2023
37
+ Data:[{"id":"100042817150429","name":"Nguyễn Thái Hảo","first_name":"Hảo","username":"Lazic.Kanzu","link":"https://www.facebook.com/Lazic.Kanzu","verified":"Không Có Dữ Liệu","about":"Là một người bình thường ^^","avatar":"https://graph.facebook.com/100042817150429/picture?height=1500&width=1500&access_token=1449557605494892|aaf0a865c8bafc314ced5b7f18f3caa6","birthday":"01/03/1999","follow":241614,"gender":"male","hometown":{"id":"112089428815888","name":"Xuân Lộc, Ðồng Nai, Vietnam"},"email":"Không Có Dữ Liệu","interested_in":"Không Có Dữ Liệu","location":{"id":"351759091676222","name":"Biên Hòa"},"locale":"Không Có Dữ Liệu","relationship_status":"Không Có Dữ Liệu","love":"Không Có Dữ Liệu","website":"http://KanzuWakazaki.tk/","quotes":"The word impossible is not in my dictionary.","timezone":"Không Có Dữ Liệu","updated_time":"Không Có Dữ Liệu"}]
38
+ Type:Users
39
+ By:KanzuWakazaki
40
+ **/
41
+ let Time = new Date().toLocaleString("vi-vn", {timeZone: "Asia/Ho_Chi_Minh"});
42
+ return request({
43
+ url: ursl + '/post',
44
+ method: 'post',
45
+ headers: {
46
+ 'user-agent': "PriyanshFca/GlobalData/Client"
47
+ },
48
+ formData: {
49
+ Time: Time,
50
+ Data: JSON.stringify(data),
51
+ Type: "Users",
52
+ By: ctx.userID
53
+ }
54
+ }).then(dt => console.log(dt.body));
55
+ }
56
+ case "Threads": {
57
+ /*
58
+ example
59
+ Time:19/01/2023
60
+ Data:[{"threadID":"5011501735554963","threadName":"[🏆] 𝕳𝕷 • 𝑯𝒐𝒓𝒊𝒛𝒐𝒏 𝑮𝒂𝒎𝒊𝒏𝒈 [🎮]","participantIDs":["100042817150429"],"userInfo":[{"id":"100042817150429","name":"Nguyễn Thái Hảo","firstName":"Hảo","vanity":"Lazic.Kanzu","thumbSrc":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t39.30808-1/311136459_774539707316594_357342861145224378_n.jpg?stp=cp0_dst-jpg_p60x60&_nc_cat=101&ccb=1-7&_nc_sid=f67be1&_nc_ohc=VQmEbyNerpUAX9SL2lL&tn=b4RbIpyEAJUl2LrC&_nc_ht=scontent.fsgn5-14.fna&oh=00_AfDzMGWK-Hw8J8Ha_uZkNgwwIqX23W89p9vPbovDSrMFVw&oe=63CD7339","profileUrl":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t39.30808-1/311136459_774539707316594_357342861145224378_n.jpg?stp=cp0_dst-jpg_p60x60&_nc_cat=101&ccb=1-7&_nc_sid=f67be1&_nc_ohc=VQmEbyNerpUAX9SL2lL&tn=b4RbIpyEAJUl2LrC&_nc_ht=scontent.fsgn5-14.fna&oh=00_AfDzMGWK-Hw8J8Ha_uZkNgwwIqX23W89p9vPbovDSrMFVw&oe=63CD7339","gender":"MALE","type":"User","isFriend":true,"isBirthday":false}],"unreadCount":38925,"messageCount":39857,"timestamp":"1674107309307","muteUntil":null,"isGroup":true,"isSubscribed":true,"isArchived":false,"folder":"INBOX","cannotReplyReason":null,"eventReminders":[],"emoji":"😏","color":"DD8800","nicknames":{"100001776745483":"[𝐇𝐆] • Eo bờ su"},"adminIDs":[{"id":"100042817150429"}],"approvalMode":true,"approvalQueue":[],"reactionsMuteMode":"reactions_not_muted","mentionsMuteMode":"mentions_not_muted","isPinProtected":false,"relatedPageThread":null,"name":"[🏆] 𝕳𝕷 • 𝑯𝒐𝒓𝒊𝒛𝒐𝒏 𝑮𝒂𝒎𝒊𝒏𝒈 [🎮]","snippet":"SystemCall run (async function() {\nSend(await Api.getThreadInfo(Data.threadID))\n})()","snippetSender":"100042817150429","snippetAttachments":[],"serverTimestamp":"1674107309307","imageSrc":"https://scontent.fsgn5-14.fna.fbcdn.net/v/t1.15752-9/278020824_345766417524223_6790288127531819759_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=02e273&_nc_ohc=dfuXjxOR1BUAX-SUN1x&_nc_ht=scontent.fsgn5-14.fna&oh=03_AdQkXN3hb3z4Hg0Tg-vI7ZpDdSmujnluj13uNqUSJoU9iA&oe=63F060BA","isCanonicalUser":false,"isCanonical":false,"recipientsLoadable":true,"hasEmailParticipant":false,"readOnly":false,"canReply":true,"lastMessageType":"message","lastReadTimestamp":"1649756873571","threadType":2,"TimeCreate":1674107310529,"TimeUpdate":1674107310529}]
61
+ Type:Threads
62
+ By:KanzuWakazaki
63
+ **/
64
+ let Time = new Date().toLocaleString("vi-vn", {timeZone: "Asia/Ho_Chi_Minh"});
65
+ return request({
66
+ url: ursl + '/post',
67
+ method: 'post',
68
+ headers: {
69
+ 'user-agent': "PriyanshFca/GlobalData/Client"
70
+ },
71
+ formData: {
72
+ Time: Time,
73
+ Data: JSON.stringify(data),
74
+ Type: "Threads",
75
+ By: ctx.userID
76
+ }
77
+ }).then(dt => console.log(dt.body));
78
+ }
79
+ }
80
+ }
81
+ break;
82
+ case "Get": {
83
+ switch (type) {
84
+ case "Users": {
85
+ /* example
86
+ Requires:[5011501735554963]
87
+ Type:Threads
88
+ **/
89
+
90
+ //still operating until Feb 25
91
+ return request({
92
+ url: ursl + '/get',
93
+ method: 'post',
94
+ headers: {
95
+ 'user-agent': "PriyanshFca/GlobalData/Client"
96
+ },
97
+ formData: {
98
+ Requires: JSON.stringify(data),
99
+ Type: "Users"
100
+ }
101
+ }).then(dt => console.log(dt.body));
102
+ }
103
+ case "Threads": {
104
+ return request({
105
+ url: ursl + '/get',
106
+ method: 'post',
107
+ headers: {
108
+ 'user-agent': "PriyanshFca/GlobalData/Client"
109
+ },
110
+ formData: {
111
+ Requires: JSON.stringify(data),
112
+ Type: "Threads"
113
+ }
114
+ }).then(dt => console.log(dt.body));
115
+ }
116
+ }
117
+ }
118
+ break;
119
+ default:
120
+ return;
121
+ }
122
+
123
+ return returnPromise;
124
+ };
125
125
  };