yandev 3.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of yandev might be problematic. Click here for more details.

Files changed (101) hide show
  1. package/.cache/replit/__replit_disk_meta.json +1 -0
  2. package/.cache/replit/nix/env.json +1 -0
  3. package/.config/configstore/update-notifier-npm.json +4 -0
  4. package/.config/configstore/update-notifier-npm.json.1735545094 +4 -0
  5. package/.gitattributes +2 -0
  6. package/.replit +93 -0
  7. package/.upm/store.json +1 -0
  8. package/ConfigFca.json +38 -0
  9. package/Extra/Database/index.js +469 -0
  10. package/Extra/ExtraAddons.js +82 -0
  11. package/Extra/ExtraFindUID.js +62 -0
  12. package/Extra/ExtraGetThread.js +340 -0
  13. package/Extra/ExtraScreenShot.js +430 -0
  14. package/Extra/ExtraUptimeRobot.js +38 -0
  15. package/Extra/Html/Classic/script.js +833 -0
  16. package/Extra/Html/Classic/style.css +1222 -0
  17. package/Extra/Security/Index.js +173 -0
  18. package/Extra/Security/Step_1.js +6 -0
  19. package/Extra/Security/Step_2.js +22 -0
  20. package/Extra/Security/Step_3.js +22 -0
  21. package/Extra/Src/Change_Environment.js +24 -0
  22. package/Extra/Src/Check_Update.js +66 -0
  23. package/Extra/Src/History.js +115 -0
  24. package/Extra/Src/Instant_Update.js +64 -0
  25. package/Extra/Src/Last-Run.js +65 -0
  26. package/Extra/Src/Release_Memory.js +41 -0
  27. package/Extra/Src/image/checkmate.jpg +0 -0
  28. package/Extra/Src/uuid.js +137 -0
  29. package/Func/AcceptAgreement.js +31 -0
  30. package/Func/ClearCache.js +64 -0
  31. package/Func/ReportV1.js +54 -0
  32. package/Index.js +378 -0
  33. package/LICENSE +21 -0
  34. package/Language/index.json +224 -0
  35. package/Main.js +1110 -0
  36. package/README.md +142 -0
  37. package/broadcast.js +40 -0
  38. package/logger.js +66 -0
  39. package/package.json +102 -0
  40. package/replit.nix +8 -0
  41. package/src/Dev_Horizon_Data.js +125 -0
  42. package/src/Premium.js +25 -0
  43. package/src/Screenshot.js +83 -0
  44. package/src/addExternalModule.js +16 -0
  45. package/src/addUserToGroup.js +79 -0
  46. package/src/changeAdminStatus.js +79 -0
  47. package/src/changeArchivedStatus.js +41 -0
  48. package/src/changeAvt.js +85 -0
  49. package/src/changeBio.js +65 -0
  50. package/src/changeBlockedStatus.js +36 -0
  51. package/src/changeGroupImage.js +106 -0
  52. package/src/changeNickname.js +45 -0
  53. package/src/changeThreadColor.js +62 -0
  54. package/src/changeThreadEmoji.js +42 -0
  55. package/src/createNewGroup.js +70 -0
  56. package/src/createPoll.js +60 -0
  57. package/src/deleteMessage.js +45 -0
  58. package/src/deleteThread.js +43 -0
  59. package/src/forwardAttachment.js +48 -0
  60. package/src/getAccessToken.js +28 -0
  61. package/src/getCurrentUserID.js +7 -0
  62. package/src/getEmojiUrl.js +27 -0
  63. package/src/getFriendsList.js +73 -0
  64. package/src/getMessage.js +80 -0
  65. package/src/getThreadHistory.js +537 -0
  66. package/src/getThreadInfo.js +425 -0
  67. package/src/getThreadList.js +213 -0
  68. package/src/getThreadMain.js +220 -0
  69. package/src/getThreadPictures.js +59 -0
  70. package/src/getUID.js +59 -0
  71. package/src/getUserID.js +62 -0
  72. package/src/getUserInfo.js +113 -0
  73. package/src/getUserInfoMain.js +65 -0
  74. package/src/getUserInfoV2.js +32 -0
  75. package/src/getUserInfoV3.js +63 -0
  76. package/src/getUserInfoV4.js +55 -0
  77. package/src/getUserInfoV5.js +61 -0
  78. package/src/handleFriendRequest.js +46 -0
  79. package/src/handleMessageRequest.js +49 -0
  80. package/src/httpGet.js +49 -0
  81. package/src/httpPost.js +48 -0
  82. package/src/httpPostFormData.js +41 -0
  83. package/src/listenMqtt.js +786 -0
  84. package/src/logout.js +68 -0
  85. package/src/markAsDelivered.js +48 -0
  86. package/src/markAsRead.js +70 -0
  87. package/src/markAsReadAll.js +43 -0
  88. package/src/markAsSeen.js +51 -0
  89. package/src/muteThread.js +47 -0
  90. package/src/removeUserFromGroup.js +49 -0
  91. package/src/resolvePhotoUrl.js +37 -0
  92. package/src/searchForThread.js +43 -0
  93. package/src/sendMessage.js +379 -0
  94. package/src/sendTypingIndicator.js +80 -0
  95. package/src/setMessageReaction.js +109 -0
  96. package/src/setPostReaction.js +102 -0
  97. package/src/setTitle.js +74 -0
  98. package/src/threadColors.js +39 -0
  99. package/src/unfriend.js +43 -0
  100. package/src/unsendMessage.js +40 -0
  101. package/utils.js +1684 -0
@@ -0,0 +1,82 @@
1
+ 'use strict';
2
+
3
+ var utils = require('../utils');
4
+ var logger = require('../logger')
5
+ var OTP = require('totp-generator');
6
+
7
+ module.exports.getInfo = async function (id,jar,ctx,defaultFuncs) {
8
+ var AccessToken = await module.exports.getAccessToken(jar,ctx,defaultFuncs);
9
+ var { body:Data } = await utils.get(`https://graph.facebook.com/${id}?fields=age_range,picture,cover,name,first_name,email,about,birthday,gender,website,hometown,link,location,quotes,relationship_status,significant_other,username,subscribers.limite(0)&access_token=${AccessToken}`,jar,null,ctx.globalOptions);
10
+ var Format = {
11
+ id: JSON.parse(Data).id || "Không Có Dữ Liệu",
12
+ name: JSON.parse(Data).name || "Không Có Dữ Liệu",
13
+ first_name: JSON.parse(Data).first_name || "Không Có Dữ Liệu",
14
+ username: JSON.parse(Data).username || "Không Có Dữ Liệu",
15
+ link: JSON.parse(Data).link || "Không Có Dữ Liệu",
16
+ verified: JSON.parse(Data).verified || "Không Có Dữ Liệu",
17
+ about: JSON.parse(Data).about || "Không Có Dữ Liệu",
18
+ avatar: JSON.parse(Data).picture.data.url || "Không Có Dữ Liệu",
19
+ cover: JSON.parse(Data).cover.source || "Không Có Dữ Liệu",
20
+ birthday: JSON.parse(Data).birthday || "Không Có Dữ Liệu",
21
+ age: JSON.parse(Data).age_range.min || "Không Có Dữ Liệu",
22
+ follow: JSON.parse(Data).subscribers.summary.total_count || "Không Có Dữ Liệu",
23
+ gender: JSON.parse(Data).gender || "Không Có Dữ Liệu",
24
+ hometown: JSON.parse(Data).hometown || "Không Có Dữ Liệu",
25
+ email: JSON.parse(Data).email || "Không Có Dữ Liệu",
26
+ interested_in: JSON.parse(Data).interested_in || "Không Có Dữ Liệu",
27
+ location: JSON.parse(Data).location || "Không Có Dữ Liệu",
28
+ locale: JSON.parse(Data).locale || "Không Có Dữ Liệu",
29
+ relationship_status: JSON.parse(Data).relationship_status || "Không Có Dữ Liệu",
30
+ love: JSON.parse(Data).significant_other || "Không Có Dữ Liệu",
31
+ website: JSON.parse(Data).website || "Không Có Dữ Liệu",
32
+ quotes: JSON.parse(Data).quotes || "Không Có Dữ Liệu",
33
+ timezone: JSON.parse(Data).timezone || "Không Có Dữ Liệu",
34
+ updated_time: JSON.parse(Data).updated_time || "Không Có Dữ Liệu"
35
+ }
36
+ return Format;
37
+ }
38
+
39
+ /**
40
+ * Help: @ManhG
41
+ * Author: @KanzuWakazaki
42
+ */
43
+
44
+ module.exports.getAccessToken = async function (jar, ctx,defaultFuncs) {
45
+ if (global.Fca.Data.AccessToken) {
46
+ return global.Fca.Data.AccessToken;
47
+ }
48
+ else {
49
+ var nextURLS = "https://business.facebook.com/security/twofactor/reauth/enter/"
50
+ return defaultFuncs.get('https://business.facebook.com/business_locations', jar, null, ctx.globalOptions).then(async function(data) {
51
+ try {
52
+ if (/"],\["(.*?)","/.exec(/LMBootstrapper(.*?){"__m":"LMBootstrapper"}/.exec(data.body)[1])[1]) {
53
+ global.Fca.Data.AccessToken = /"],\["(.*?)","/.exec(/LMBootstrapper(.*?){"__m":"LMBootstrapper"}/.exec(data.body)[1])[1];
54
+ return /"],\["(.*?)","/.exec(/LMBootstrapper(.*?){"__m":"LMBootstrapper"}/.exec(data.body)[1])[1];
55
+ }
56
+ }
57
+ catch (_) {
58
+ if (global.Fca.Require.FastConfig.AuthString.includes('|')) return logger.Error(global.Fca.Require.Language.Index.Missing)
59
+ var OPTCODE = global.Fca.Require.FastConfig.AuthString.includes(" ") ? global.Fca.Require.FastConfig.AuthString.replace(RegExp(" ", 'g'), "") : global.Fca.Require.FastConfig.AuthString;
60
+ var Form = {
61
+ approvals_code: OTP(String(OPTCODE)),
62
+ save_device: false,
63
+ lsd: utils.getFrom(data.body, "[\"LSD\",[],{\"token\":\"", "\"}")
64
+ }
65
+ return defaultFuncs.post(nextURLS, jar, Form, ctx.globalOptions, {
66
+ referer: "https://business.facebook.com/security/twofactor/reauth/?twofac_next=https%3A%2F%2Fbusiness.facebook.com%2Fbusiness_locations&type=avoid_bypass&app_id=0&save_device=0",
67
+ }).then(async function(data) {
68
+ if (String(data.body).includes(false)) throw { Error: "Invaild OTP | FastConfigFca.json: AuthString" }
69
+ return defaultFuncs.get('https://business.facebook.com/business_locations', jar, null, ctx.globalOptions,{
70
+ referer: "https://business.facebook.com/security/twofactor/reauth/?twofac_next=https%3A%2F%2Fbusiness.facebook.com%2Fbusiness_locations&type=avoid_bypass&app_id=0&save_device=0",
71
+ }).then(async function(data) {
72
+ var Access_Token = /"],\["(.*?)","/.exec(/LMBootstrapper(.*?){"__m":"LMBootstrapper"}/.exec(data.body)[1])[1];
73
+ global.Fca.Data.AccessToken = Access_Token;
74
+ return Access_Token;
75
+ });
76
+ });
77
+ }
78
+ })
79
+ }
80
+ }
81
+
82
+ //hard working =))
@@ -0,0 +1,62 @@
1
+ 'use strict';
2
+
3
+ const got = global.Fca.Require.Fetch;
4
+
5
+ /**
6
+ * @param {string | URL} url
7
+ * @param {{ sendMessage: (arg0: string, arg1: any) => any; }} api
8
+ */
9
+ async function getUIDSlow(url,api) {
10
+ var FormData = require("form-data");
11
+ var Form = new FormData();
12
+ var Url = new URL(url);
13
+ Form.append('username', Url.pathname.replace(/\//g, ""));
14
+ try {
15
+ var data = await got.post('https://api.findids.net/api/get-uid-from-username',{
16
+ body: Form,
17
+ userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.79 Safari/537.36'
18
+ })
19
+ } catch (e) {
20
+ console.log(global.Fca.Data.event.threadID,e)
21
+ return api.sendMessage("Lỗi: " + e.message,global.Fca.Data.event.threadID);
22
+ }
23
+ if (JSON.parse(data.body.toString()).status != 200) return api.sendMessage('Đã bị lỗi !',global.Fca.Data.event.threadID)
24
+ if (typeof JSON.parse(data.body.toString()).error === 'string') return "errr"
25
+ else return JSON.parse(data.body.toString()).data.id || "nịt";
26
+ }
27
+
28
+ /**
29
+ * @param {string | URL} url
30
+ * @param {{ sendMessage: (arg0: string, arg1: any, arg2: any) => any; }} api
31
+ */
32
+ async function getUIDFast(url,api) {
33
+ var FormData = require("form-data");
34
+ var Form = new FormData();
35
+ var Url = new URL(url);
36
+ Form.append('link', Url.href);
37
+ try {
38
+ var data = await got.post('https://id.traodoisub.com/api.php',{
39
+ body: Form
40
+ })
41
+ } catch (e) {
42
+ return api.sendMessage("Lỗi: " + e.message,global.Fca.Data.event.threadID,global.Fca.Data.event.messageID);
43
+ }
44
+ if (JSON.parse(data.body.toString()).error) return api.sendMessage(JSON.parse(data.body.toString()).error,global.Fca.Data.event.threadID,global.Fca.Data.event.messageID);
45
+ else return JSON.parse(data.body.toString()).id || "co cai nit huhu";
46
+ }
47
+
48
+ /**
49
+ * @param {any} url
50
+ * @param {any} api
51
+ */
52
+ async function getUID(url,api) {
53
+ var getUID = await getUIDFast(url,api);
54
+ if (!isNaN(getUID) == true) return getUID;
55
+ else {
56
+ let getUID = await getUIDSlow(url,api);
57
+ if (!isNaN(data) == true) return getUID;
58
+ else return null;
59
+ }
60
+ }
61
+
62
+ module.exports = getUID;
@@ -0,0 +1,340 @@
1
+ /* eslint-disable */
2
+ "use strict";
3
+ var Database= require("./Database");
4
+ const { lastRun,capture } = require('./Src/Last-Run');
5
+ const logger = require("../logger");
6
+ const getText = global.Fca.getText;
7
+ var language = require("../Language/index.json");
8
+ const fs = require("fs");
9
+ language = language.find(i => i.Language == require(process.cwd() + "/ConfigFca.json").Language).Folder.ExtraGetThread;
10
+
11
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
12
+ if (!fs.existsSync(process.cwd() + "/Zeid_Database/Threads.json")) {
13
+ fs.writeFileSync(process.cwd() + "/Zeid_Database/Threads.json",JSON.stringify({}));
14
+ }
15
+ }
16
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type != "default" && global.Fca.Require.FastConfig.AntiGetInfo.Database_Type != "json") {
17
+ logger.Warning("Database_Type in ConfigFca.json is not valid. Only default and json are valid.");
18
+ process.exit(0);
19
+ }
20
+
21
+ exports.createData = function(threadID,threadData) {
22
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
23
+ try {
24
+ Database(true).set(String(threadID),Object(threadData));
25
+ logger.Normal(getText(language.CreateDatabaseSuccess,String(threadID)));
26
+ }
27
+ catch (e) {
28
+ console.log(e);
29
+ logger.Warning(getText(language.CreateDatabaseFailure,String(threadID)));
30
+ }
31
+ }
32
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
33
+ try {
34
+ try {
35
+ var data = require(process.cwd() + "/Zeid_Database/Threads.json");
36
+ }
37
+ catch (e) {
38
+ var data = {};
39
+ fs.writeFileSync(process.cwd() + "/Zeid_Database/Threads.json",JSON.stringify(data));
40
+ }
41
+
42
+ data[String(threadID)] = Object(threadData);
43
+ fs.writeFileSync(process.cwd() + "/Zeid_Database/Threads.json",JSON.stringify(data));
44
+ logger.Normal(getText(language.CreateDatabaseSuccess,String(threadID)));
45
+ }
46
+ catch (e) {
47
+ console.log(e);
48
+ logger.Warning(getText(language.CreateDatabaseFailure,String(threadID)));
49
+ }
50
+ }
51
+ }
52
+
53
+ exports.updateData = function(threadID,threadData) {
54
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
55
+ try {
56
+ Database(true).set(String(threadID),Object(threadData));
57
+ logger.Normal(getText(language.updateDataSuccess,String(threadID)));
58
+ }
59
+ catch (e) {
60
+ console.log(e);
61
+ logger.Warning(getText(language.updateDataFailure,String(threadID)));
62
+ }
63
+ }
64
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
65
+ try {
66
+ try {
67
+ var data = require(process.cwd() + "/Zeid_Database/Threads.json");
68
+ }
69
+ catch (e) {
70
+ var data = {};
71
+ fs.writeFileSync(process.cwd() + "/Zeid_Database/Threads.json",JSON.stringify(data));
72
+ }
73
+
74
+ data[String(threadID)] = Object(threadData);
75
+ fs.writeFileSync(process.cwd() + "/Zeid_Database/Threads.json",JSON.stringify(data));
76
+ logger.Normal(getText(language.updateDataSuccess,String(threadID)));
77
+ }
78
+ catch (e) {
79
+ console.log(e);
80
+ logger.Warning(getText(language.updateDataFailure,String(threadID)));
81
+ }
82
+ }
83
+ }
84
+
85
+ exports.updateMessageCount = function(threadID,threadData) {
86
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
87
+ try {
88
+ Database(true).set(String(threadID),Object(threadData));
89
+ }
90
+ catch (e) {
91
+ console.log(e);
92
+ }
93
+ }
94
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
95
+ try {
96
+ try {
97
+ var data = require(process.cwd() + "/Zeid_Database/Threads.json");
98
+ }
99
+ catch (e) {
100
+ var data = {};
101
+ fs.writeFileSync(process.cwd() + "/Zeid_Database/Threads.json",JSON.stringify(data));
102
+ }
103
+
104
+ data[String(threadID)] = Object(threadData);
105
+ fs.writeFileSync(process.cwd() + "/Zeid_Database/Threads.json",JSON.stringify(data));
106
+ }
107
+ catch (e) {
108
+ console.log(e);
109
+ }
110
+ }
111
+ }
112
+
113
+ exports.getData = function(threadID) {
114
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
115
+ switch (Database(true).has(String(threadID))) {
116
+ case true: {
117
+ return Database(true).get(String(threadID))
118
+ }
119
+ case false: {
120
+ return null;
121
+ }
122
+ }
123
+ }
124
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
125
+ try {
126
+ var data = require(process.cwd() + "/Zeid_Database/Threads.json");
127
+ switch (data.hasOwnProperty(String(threadID))) {
128
+ case true: {
129
+ return data[String(threadID)];
130
+ }
131
+ case false: {
132
+ return null;
133
+ }
134
+ }
135
+ }
136
+ catch (e) {
137
+ console.log(e);
138
+ return null;
139
+ }
140
+ }
141
+ }
142
+
143
+ exports.deleteAll = function(data) {
144
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
145
+ for (let i of data) {
146
+ Database(true).delete(String(i));
147
+ }
148
+ }
149
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
150
+ try {
151
+ var data1 = require(process.cwd() + "/Zeid_Database/Threads.json");
152
+ for (let i of data) {
153
+ delete data1[String(i)];
154
+ }
155
+ fs.writeFileSync(process.cwd() + "/Zeid_Database/Threads.json",JSON.stringify(data1));
156
+ }
157
+ catch (e) {
158
+ console.log(e);
159
+ }
160
+ }
161
+ }
162
+
163
+ exports.getAll = function() {
164
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
165
+ return Database(true).list();
166
+ }
167
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
168
+ try {
169
+ const Data_Res = []
170
+ var data = require(process.cwd() + "/Zeid_Database/Threads.json");
171
+ for (let i of Object.keys(data)) {
172
+ Data_Res.push({
173
+ ID: String(i),
174
+ data: data[String(i)]
175
+ });
176
+ }
177
+ return Data_Res;
178
+ }
179
+ catch (e) {
180
+ console.log(e);
181
+ return [];
182
+ }
183
+ }
184
+ }
185
+
186
+ exports.hasData = function(threadID) {
187
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
188
+ return Database(true).has(String(threadID));
189
+ }
190
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
191
+ try {
192
+ var data = require(process.cwd() + "/Zeid_Database/Threads.json");
193
+ return data.hasOwnProperty(String(threadID));
194
+ }
195
+ catch (e) {
196
+ console.log(e);
197
+ return false;
198
+ }
199
+ }
200
+ }
201
+
202
+ exports.alreadyUpdate = function(threadID) {
203
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
204
+ var Time = Database(true).get(String(threadID)).TimeUpdate;
205
+ try {
206
+ if (global.Fca.startTime >= (Time + (3600 * 1000))) {
207
+ logger.Normal(getText(language.alreadyUpdate, String(threadID)));
208
+ return true;
209
+ }
210
+ else return false;
211
+ }
212
+ catch (e) {
213
+ console.log(e);
214
+ return true;
215
+ }
216
+ }
217
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
218
+ try {
219
+ var data = require(process.cwd() + "/Zeid_Database/Threads.json");
220
+ var Time = data[String(threadID)].TimeUpdate;
221
+ try {
222
+ if (global.Fca.startTime >= (Time + (3600 * 1000))) {
223
+ logger.Normal(getText(language.alreadyUpdate, String(threadID)));
224
+ return true;
225
+ }
226
+ else return false;
227
+ }
228
+ catch (e) {
229
+ console.log(e);
230
+ return true;
231
+ }
232
+ }
233
+ catch (e) {
234
+ console.log(e);
235
+ return true;
236
+ }
237
+ }
238
+ }
239
+
240
+ exports.readyCreate = function(Name) {
241
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
242
+ switch (Database(true).has(String(Name))) {
243
+ case true: {
244
+ if (Number(global.Fca.startTime) >= Number(Database(true).get(String(Name)) + (120 * 1000))) {
245
+ return true;
246
+ }
247
+ else {
248
+ return false;
249
+ }
250
+ }
251
+ case false: {
252
+ return false;
253
+ }
254
+ }
255
+ }
256
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
257
+ try {
258
+ var data = require(process.cwd() + "/Zeid_Database/Threads.json");
259
+ switch (data.hasOwnProperty(String(Name))) {
260
+ case true: {
261
+ if (Number(global.Fca.startTime) >= Number(data[String(Name)] + (120 * 1000))) {
262
+ return true;
263
+ }
264
+ else {
265
+ return false;
266
+ }
267
+ }
268
+ case false: {
269
+ return false;
270
+ }
271
+ }
272
+ }
273
+ catch (e) {
274
+ console.log(e);
275
+ return false;
276
+ }
277
+ }
278
+ }
279
+
280
+ exports.setLastRun = function(Name,LastRun) {
281
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
282
+ Database(true).set(String(Name),String(lastRun(LastRun)));
283
+ }
284
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
285
+ try {
286
+ var data = require(process.cwd() + "/Zeid_Database/Threads.json");
287
+ data[String(Name)] = String(lastRun(LastRun));
288
+ fs.writeFileSync(process.cwd() + "/Zeid_Database/Threads.json",JSON.stringify(data));
289
+ }
290
+ catch (e) {
291
+ console.log(e);
292
+ }
293
+ }
294
+ }
295
+
296
+ exports.getLastRun = function(Name) {
297
+ if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "default") {
298
+ switch (Database(true).has(String(Name))) {
299
+ case true: {
300
+ return Database(true).get(String(Name));
301
+ }
302
+ case false: {
303
+ try {
304
+ capture(Name)
305
+ this.setLastRun(Name,Name);
306
+ return Database(true).get(String(Name));
307
+ }
308
+ catch(e) {
309
+ console.log(e);
310
+ return Date.now();
311
+ }
312
+ }
313
+ }
314
+ }
315
+ else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
316
+ try {
317
+ var data = require(process.cwd() + "/Zeid_Database/Threads.json");
318
+ switch (data.hasOwnProperty(String(Name))) {
319
+ case true: {
320
+ return data[String(Name)];
321
+ }
322
+ case false: {
323
+ try {
324
+ capture(Name)
325
+ this.setLastRun(Name,Name);
326
+ return data[String(Name)];
327
+ }
328
+ catch(e) {
329
+ console.log(e);
330
+ return Date.now();
331
+ }
332
+ }
333
+ }
334
+ }
335
+ catch (e) {
336
+ console.log(e);
337
+ return Date.now();
338
+ }
339
+ }
340
+ }