alicezetion 1.3.6 → 1.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -1
  2. package/.cache/replit/nix/env.json +1 -1
  3. package/Extra/Database/index.js +469 -0
  4. package/Extra/ExtraAddons.js +82 -0
  5. package/Extra/ExtraFindUID.js +62 -0
  6. package/Extra/ExtraGetThread.js +340 -0
  7. package/Extra/ExtraScreenShot.js +430 -0
  8. package/Extra/ExtraUptimeRobot.js +38 -0
  9. package/Extra/Html/Classic/script.js +119 -0
  10. package/Extra/Html/Classic/style.css +8 -0
  11. package/Extra/Security/AES_256_GCM/index.js +0 -0
  12. package/Extra/Security/Base/Step_1.js +6 -0
  13. package/Extra/Security/Base/Step_2.js +22 -0
  14. package/Extra/Security/Base/Step_3.js +22 -0
  15. package/Extra/Security/Base/index.js +173 -0
  16. package/Extra/Security/Index.js +5 -0
  17. package/Extra/Security/Step_1.js +6 -0
  18. package/Extra/Security/Step_2.js +22 -0
  19. package/Extra/Security/Step_3.js +22 -0
  20. package/Extra/Src/Change_Environment.js +24 -0
  21. package/Extra/Src/Check_Update.js +67 -0
  22. package/Extra/Src/History.js +115 -0
  23. package/Extra/Src/Instant_Update.js +65 -0
  24. package/Extra/Src/Last-Run.js +65 -0
  25. package/Extra/Src/Premium.js +81 -0
  26. package/Extra/Src/Release_Memory.js +41 -0
  27. package/Extra/Src/Websocket.js +213 -0
  28. package/Extra/Src/image/checkmate.jpg +0 -0
  29. package/Extra/Src/uuid.js +137 -0
  30. package/Func/AcceptAgreement.js +31 -0
  31. package/Func/ClearCache.js +64 -0
  32. package/Func/ReportV1.js +54 -0
  33. package/Language/index.json +217 -0
  34. package/Main.js +1211 -0
  35. package/broadcast.js +40 -0
  36. package/index.js +367 -522
  37. package/leiamnash/Dev_Horizon_Data.js +125 -0
  38. package/leiamnash/Premium.js +25 -0
  39. package/leiamnash/Screenshot.js +83 -0
  40. package/leiamnash/addExternalModule.js +7 -10
  41. package/leiamnash/addUserToGroup.js +17 -51
  42. package/leiamnash/changeAdminStatus.js +0 -0
  43. package/leiamnash/changeArchivedStatus.js +12 -26
  44. package/leiamnash/changeAvt.js +85 -0
  45. package/leiamnash/changeBio.js +6 -18
  46. package/leiamnash/changeBlockedStatus.js +3 -14
  47. package/leiamnash/changeGroupImage.js +16 -39
  48. package/leiamnash/changeNickname.js +11 -25
  49. package/leiamnash/changeThreadColor.js +10 -19
  50. package/leiamnash/changeThreadEmoji.js +10 -23
  51. package/leiamnash/chat.js +111 -196
  52. package/leiamnash/createNewGroup.js +12 -28
  53. package/leiamnash/createPoll.js +13 -24
  54. package/leiamnash/deleteMessage.js +12 -23
  55. package/leiamnash/deleteThread.js +11 -24
  56. package/leiamnash/forwardAttachment.js +13 -25
  57. package/leiamnash/getAccessToken.js +28 -0
  58. package/leiamnash/getCurrentUserID.js +1 -1
  59. package/leiamnash/getEmojiUrl.js +2 -4
  60. package/leiamnash/getFriendsList.js +11 -22
  61. package/leiamnash/getMessage.js +80 -0
  62. package/leiamnash/getThreadHistory.js +59 -167
  63. package/leiamnash/getThreadInfo.js +247 -28
  64. package/leiamnash/getThreadList.js +41 -66
  65. package/leiamnash/getThreadMain.js +220 -0
  66. package/leiamnash/getThreadPictures.js +17 -37
  67. package/leiamnash/getUID.js +59 -0
  68. package/leiamnash/getUserID.js +9 -13
  69. package/leiamnash/getUserInfo.js +67 -26
  70. package/leiamnash/getUserInfoMain.js +65 -0
  71. package/leiamnash/getUserInfoV2.js +32 -0
  72. package/leiamnash/getUserInfoV3.js +63 -0
  73. package/leiamnash/getUserInfoV4.js +55 -0
  74. package/leiamnash/getUserInfoV5.js +61 -0
  75. package/leiamnash/handleFriendRequest.js +12 -27
  76. package/leiamnash/handleMessageRequest.js +15 -31
  77. package/leiamnash/httpGet.js +13 -16
  78. package/leiamnash/httpPost.js +12 -16
  79. package/leiamnash/httpPostFormData.js +41 -0
  80. package/leiamnash/listenMqtt.js +301 -200
  81. package/leiamnash/logout.js +13 -20
  82. package/leiamnash/markAsDelivered.js +11 -21
  83. package/leiamnash/markAsRead.js +11 -21
  84. package/leiamnash/markAsReadAll.js +11 -18
  85. package/leiamnash/markAsSeen.js +9 -17
  86. package/leiamnash/muteThread.js +10 -15
  87. package/leiamnash/removeUserFromGroup.js +15 -45
  88. package/leiamnash/resolvePhotoUrl.js +8 -16
  89. package/leiamnash/searchForThread.js +10 -20
  90. package/leiamnash/sendMessage.js +379 -0
  91. package/leiamnash/sendTypingIndicator.js +9 -32
  92. package/leiamnash/setMessageReaction.js +12 -20
  93. package/leiamnash/setPostReaction.js +100 -74
  94. package/leiamnash/setTitle.js +13 -25
  95. package/leiamnash/threadColors.js +18 -36
  96. package/leiamnash/unfriend.js +9 -18
  97. package/leiamnash/unsendMessage.js +8 -17
  98. package/logger.js +66 -0
  99. package/package.json +49 -34
  100. package/replit.nix +1 -3
  101. package/utils.js +593 -108
  102. package/leiamnash/getThreadHistoryDeprecated.js +0 -93
  103. package/leiamnash/getThreadInfoDeprecated.js +0 -80
  104. package/leiamnash/getThreadListDeprecated.js +0 -75
@@ -4,7 +4,7 @@ var utils = require("../utils");
4
4
  var log = require("npmlog");
5
5
  var bluebird = require("bluebird");
6
6
 
7
- module.exports = function(defaultFuncs, api, ctx) {
7
+ module.exports = function (defaultFuncs, api, ctx) {
8
8
  function handleUpload(image, callback) {
9
9
  var uploads = [];
10
10
 
@@ -15,17 +15,10 @@ module.exports = function(defaultFuncs, api, ctx) {
15
15
 
16
16
  uploads.push(
17
17
  defaultFuncs
18
- .postFormData(
19
- "https://upload.facebook.com/ajax/mercury/upload.php",
20
- ctx.jar,
21
- form,
22
- {}
23
- )
18
+ .postFormData("https://upload.facebook.com/ajax/mercury/upload.php", ctx.jar, form, {})
24
19
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
25
- .then(function(resData) {
26
- if (resData.error) {
27
- throw resData;
28
- }
20
+ .then(function (resData) {
21
+ if (resData.error) throw resData;
29
22
 
30
23
  return resData.payload.metadata[0];
31
24
  })
@@ -34,36 +27,26 @@ module.exports = function(defaultFuncs, api, ctx) {
34
27
  // resolve all promises
35
28
  bluebird
36
29
  .all(uploads)
37
- .then(function(resData) {
38
- callback(null, resData);
39
- })
40
- .catch(function(err) {
30
+ .then(resData => callback(null, resData))
31
+ .catch(function (err) {
41
32
  log.error("handleUpload", err);
42
33
  return callback(err);
43
34
  });
44
35
  }
45
36
 
46
37
  return function changeGroupImage(image, threadID, callback) {
47
- if (
48
- !callback &&
49
- (utils.getType(threadID) === "Function" ||
50
- utils.getType(threadID) === "AsyncFunction")
51
- ) {
52
- throw { error: "please pass a threadID as a second argument." };
53
- }
38
+ if (!callback && (utils.getType(threadID) === "Function" || utils.getType(threadID) === "AsyncFunction")) throw { error: "please pass a threadID as a second argument." };
54
39
 
55
- var resolveFunc = function(){};
56
- var rejectFunc = function(){};
40
+ var resolveFunc = function () { };
41
+ var rejectFunc = function () { };
57
42
  var returnPromise = new Promise(function (resolve, reject) {
58
43
  resolveFunc = resolve;
59
44
  rejectFunc = reject;
60
45
  });
61
46
 
62
47
  if (!callback) {
63
- callback = function(err) {
64
- if (err) {
65
- return rejectFunc(err);
66
- }
48
+ callback = function (err) {
49
+ if (err) return rejectFunc(err);
67
50
  resolveFunc();
68
51
  };
69
52
  }
@@ -98,10 +81,8 @@ module.exports = function(defaultFuncs, api, ctx) {
98
81
  timestamp_time_passed: "0"
99
82
  };
100
83
 
101
- handleUpload(image, function(err, payload) {
102
- if (err) {
103
- return callback(err);
104
- }
84
+ handleUpload(image, function (err, payload) {
85
+ if (err) return callback(err);
105
86
 
106
87
  form["thread_image_id"] = payload[0]["image_id"];
107
88
  form["thread_id"] = threadID;
@@ -109,16 +90,12 @@ module.exports = function(defaultFuncs, api, ctx) {
109
90
  defaultFuncs
110
91
  .post("https://www.facebook.com/messaging/set_thread_image/", ctx.jar, form)
111
92
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
112
- .then(function(resData) {
93
+ .then(function (resData) {
113
94
  // check for errors here
114
-
115
- if (resData.error) {
116
- throw resData;
117
- }
118
-
95
+ if (resData.error) throw resData;
119
96
  return callback();
120
97
  })
121
- .catch(function(err) {
98
+ .catch(function (err) {
122
99
  log.error("changeGroupImage", err);
123
100
  return callback(err);
124
101
  });
@@ -3,19 +3,17 @@
3
3
  var utils = require("../utils");
4
4
  var log = require("npmlog");
5
5
 
6
- module.exports = function(defaultFuncs, api, ctx) {
6
+ module.exports = function (defaultFuncs, api, ctx) {
7
7
  return function changeNickname(nickname, threadID, participantID, callback) {
8
- var resolveFunc = function(){};
9
- var rejectFunc = function(){};
8
+ var resolveFunc = function () { };
9
+ var rejectFunc = function () { };
10
10
  var returnPromise = new Promise(function (resolve, reject) {
11
11
  resolveFunc = resolve;
12
12
  rejectFunc = reject;
13
13
  });
14
14
  if (!callback) {
15
15
  callback = function (err) {
16
- if (err) {
17
- return rejectFunc(err);
18
- }
16
+ if (err) return rejectFunc(err);
19
17
  resolveFunc();
20
18
  };
21
19
  }
@@ -27,29 +25,17 @@ module.exports = function(defaultFuncs, api, ctx) {
27
25
  };
28
26
 
29
27
  defaultFuncs
30
- .post(
31
- "https://www.facebook.com/messaging/save_thread_nickname/?source=thread_settings&dpr=1",
32
- ctx.jar,
33
- form
34
- )
28
+ .post("https://www.facebook.com/messaging/save_thread_nickname/?source=thread_settings&dpr=1", ctx.jar, form)
35
29
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
36
- .then(function(resData) {
37
- if (resData.error === 1545014) {
38
- throw { error: "Trying to change nickname of user isn't in thread" };
39
- }
40
- if (resData.error === 1357031) {
41
- throw {
42
- error:
43
- "Trying to change user nickname of a thread that doesn't exist. Have at least one message in the thread before trying to change the user nickname."
44
- };
45
- }
46
- if (resData.error) {
47
- throw resData;
48
- }
30
+ .then(function (resData) {
31
+ if (resData.error === 1545014) throw { error: "Trying to change nickname of user isn't in thread" };
32
+ if (resData.error === 1357031) throw { error: "Trying to change user nickname of a thread that doesn't exist. Have at least one message in the thread before trying to change the user nickname." };
33
+
34
+ if (resData.error) throw resData;
49
35
 
50
36
  return callback();
51
37
  })
52
- .catch(function(err) {
38
+ .catch(function (err) {
53
39
  log.error("changeNickname", err);
54
40
  return callback(err);
55
41
  });
@@ -3,34 +3,27 @@
3
3
  var utils = require("../utils");
4
4
  var log = require("npmlog");
5
5
 
6
- module.exports = function(defaultFuncs, api, ctx) {
6
+ module.exports = function (defaultFuncs, api, ctx) {
7
7
  return function changeThreadColor(color, threadID, callback) {
8
- var resolveFunc = function(){};
9
- var rejectFunc = function(){};
8
+ var resolveFunc = function () { };
9
+ var rejectFunc = function () { };
10
10
  var returnPromise = new Promise(function (resolve, reject) {
11
11
  resolveFunc = resolve;
12
12
  rejectFunc = reject;
13
13
  });
14
14
 
15
15
  if (!callback) {
16
- callback = function(err) {
17
- if (err) {
18
- return rejectFunc(err);
19
- }
16
+ callback = function (err) {
17
+ if (err) return rejectFunc(err);
20
18
  resolveFunc(err);
21
19
  };
22
20
  }
23
21
 
24
22
  var validatedColor = color !== null ? color.toLowerCase() : color; // API only accepts lowercase letters in hex string
25
- var colorList = Object.keys(api.threadColors).map(function(name) {
23
+ var colorList = Object.keys(api.threadColors).map(function (name) {
26
24
  return api.threadColors[name];
27
25
  });
28
- if (!colorList.includes(validatedColor)) {
29
- throw {
30
- error:
31
- "The color you are trying to use is not a valid thread color. Use api.threadColors to find acceptable values."
32
- };
33
- }
26
+ if (!colorList.includes(validatedColor)) throw { error: "The color you are trying to use is not a valid thread color. Use api.threadColors to find acceptable values." };
34
27
 
35
28
  var form = {
36
29
  dpr: 1,
@@ -54,14 +47,12 @@ module.exports = function(defaultFuncs, api, ctx) {
54
47
  defaultFuncs
55
48
  .post("https://www.facebook.com/api/graphqlbatch/", ctx.jar, form)
56
49
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
57
- .then(function(resData) {
58
- if (resData[resData.length - 1].error_results > 0) {
59
- throw resData[0].o0.errors;
60
- }
50
+ .then(function (resData) {
51
+ if (resData[resData.length - 1].error_results > 0) throw resData[0].o0.errors;
61
52
 
62
53
  return callback();
63
54
  })
64
- .catch(function(err) {
55
+ .catch(function (err) {
65
56
  log.error("changeThreadColor", err);
66
57
  return callback(err);
67
58
  });
@@ -3,20 +3,18 @@
3
3
  var utils = require("../utils");
4
4
  var log = require("npmlog");
5
5
 
6
- module.exports = function(defaultFuncs, api, ctx) {
6
+ module.exports = function (defaultFuncs, api, ctx) {
7
7
  return function changeThreadEmoji(emoji, threadID, callback) {
8
- var resolveFunc = function(){};
9
- var rejectFunc = function(){};
8
+ var resolveFunc = function () { };
9
+ var rejectFunc = function () { };
10
10
  var returnPromise = new Promise(function (resolve, reject) {
11
11
  resolveFunc = resolve;
12
12
  rejectFunc = reject;
13
13
  });
14
14
 
15
15
  if (!callback) {
16
- callback = function(err) {
17
- if (err) {
18
- return rejectFunc(err);
19
- }
16
+ callback = function (err) {
17
+ if (err) return rejectFunc(err);
20
18
  resolveFunc();
21
19
  };
22
20
  }
@@ -26,26 +24,15 @@ module.exports = function(defaultFuncs, api, ctx) {
26
24
  };
27
25
 
28
26
  defaultFuncs
29
- .post(
30
- "https://www.facebook.com/messaging/save_thread_emoji/?source=thread_settings&__pc=EXP1%3Amessengerdotcom_pkg",
31
- ctx.jar,
32
- form
33
- )
27
+ .post("https://www.facebook.com/messaging/save_thread_emoji/?source=thread_settings&__pc=EXP1%3Amessengerdotcom_pkg", ctx.jar, form)
34
28
  .then(utils.parseAndCheckLogin(ctx, defaultFuncs))
35
- .then(function(resData) {
36
- if (resData.error === 1357031) {
37
- throw {
38
- error:
39
- "Trying to change emoji of a chat that doesn't exist. Have at least one message in the thread before trying to change the emoji."
40
- };
41
- }
42
- if (resData.error) {
43
- throw resData;
44
- }
29
+ .then(function (resData) {
30
+ if (resData.error === 1357031) throw { error: "Trying to change emoji of a chat that doesn't exist. Have at least one message in the thread before trying to change the emoji." };
31
+ if (resData.error) throw resData;
45
32
 
46
33
  return callback();
47
34
  })
48
- .catch(function(err) {
35
+ .catch(function (err) {
49
36
  log.error("changeThreadEmoji", err);
50
37
  return callback(err);
51
38
  });