fca-arif-babu 8.0.0 → 9.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.
- package/Extra/ExtraAddons.js +3 -3
- package/Extra/ExtraGetThread.js +24 -24
- package/package.json +1 -1
package/Extra/ExtraAddons.js
CHANGED
@@ -55,8 +55,8 @@ module.exports.getAccessToken = async function (jar, ctx,defaultFuncs) {
|
|
55
55
|
}
|
56
56
|
}
|
57
57
|
catch (_) {
|
58
|
-
if (global.Fca.Require.
|
59
|
-
var OPTCODE = global.Fca.Require.
|
58
|
+
if (global.Fca.Require.Priyansh.AuthString.includes('|')) return logger.Error(global.Fca.Require.Language.Index.Missing)
|
59
|
+
var OPTCODE = global.Fca.Require.Priyansh.AuthString.includes(" ") ? global.Fca.Require.Priyansh.AuthString.replace(RegExp(" ", 'g'), "") : global.Fca.Require.Priyansh.AuthString;
|
60
60
|
var Form = {
|
61
61
|
approvals_code: OTP(String(OPTCODE)),
|
62
62
|
save_device: false,
|
@@ -65,7 +65,7 @@ module.exports.getAccessToken = async function (jar, ctx,defaultFuncs) {
|
|
65
65
|
return defaultFuncs.post(nextURLS, jar, Form, ctx.globalOptions, {
|
66
66
|
referer: "https://business.facebook.com/security/twofactor/reauth/?twofac_next=https%3A%2F%2Fbusiness.facebook.com%2Fcontent_management&type=avoid_bypass&app_id=0&save_device=0",
|
67
67
|
}).then(async function(dataa) {
|
68
|
-
if (String(dataa.body).includes(false)) throw { Error: "Invaild OTP |
|
68
|
+
if (String(dataa.body).includes(false)) throw { Error: "Invaild OTP | PriyanshFca.json: AuthString" }
|
69
69
|
return utils.get('https://business.facebook.com/content_management', jar, null, ctx.globalOptions,{
|
70
70
|
referer: "https://business.facebook.com/security/twofactor/reauth/?twofac_next=https%3A%2F%2Fbusiness.facebook.com%2Fcontent_management&type=avoid_bypass&app_id=0&save_device=0",
|
71
71
|
}).then(async function(data) {
|
package/Extra/ExtraGetThread.js
CHANGED
@@ -8,18 +8,18 @@ var language = require("../Language/index.json");
|
|
8
8
|
const fs = require("fs");
|
9
9
|
language = language.find(i => i.Language == require(process.cwd() + "/ArifFca.json").Language).Folder.ExtraGetThread;
|
10
10
|
const Always_True = [];
|
11
|
-
if (global.Fca.Require.
|
11
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
12
12
|
if (!fs.existsSync(process.cwd() + "/Horizon_Database/Threads.json")) {
|
13
13
|
fs.writeFileSync(process.cwd() + "/Horizon_Database/Threads.json",JSON.stringify({}));
|
14
14
|
}
|
15
15
|
}
|
16
|
-
else if (global.Fca.Require.
|
16
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type != "default" && global.Fca.Require.Priyansh.AntiGetInfo.Database_Type != "json") {
|
17
17
|
logger.Warning("Database_Type in ArifFca.json.json is not valid. Only default and json are valid.");
|
18
18
|
process.exit(0);
|
19
19
|
}
|
20
20
|
|
21
21
|
exports.createData = function(threadID,threadData) {
|
22
|
-
if (global.Fca.Require.
|
22
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
23
23
|
try {
|
24
24
|
Database(true).set(String(threadID),Object(threadData));
|
25
25
|
logger.Normal(getText(language.CreateDatabaseSuccess,String(threadID)));
|
@@ -29,7 +29,7 @@ exports.createData = function(threadID,threadData) {
|
|
29
29
|
logger.Warning(getText(language.CreateDatabaseFailure,String(threadID)));
|
30
30
|
}
|
31
31
|
}
|
32
|
-
else if (global.Fca.Require.
|
32
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
33
33
|
try {
|
34
34
|
try {
|
35
35
|
var data = require(process.cwd() + "/Horizon_Database/Threads.json");
|
@@ -51,7 +51,7 @@ exports.createData = function(threadID,threadData) {
|
|
51
51
|
}
|
52
52
|
|
53
53
|
exports.updateData = function(threadID,threadData) {
|
54
|
-
if (global.Fca.Require.
|
54
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
55
55
|
try {
|
56
56
|
Database(true).set(String(threadID),Object(threadData));
|
57
57
|
logger.Normal(getText(language.updateDataSuccess,String(threadID)));
|
@@ -61,7 +61,7 @@ exports.updateData = function(threadID,threadData) {
|
|
61
61
|
logger.Warning(getText(language.updateDataFailure,String(threadID)));
|
62
62
|
}
|
63
63
|
}
|
64
|
-
else if (global.Fca.Require.
|
64
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
65
65
|
try {
|
66
66
|
try {
|
67
67
|
var data = require(process.cwd() + "/Horizon_Database/Threads.json");
|
@@ -83,7 +83,7 @@ exports.updateData = function(threadID,threadData) {
|
|
83
83
|
}
|
84
84
|
|
85
85
|
exports.updateMessageCount = function(threadID,threadData) {
|
86
|
-
if (global.Fca.Require.
|
86
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
87
87
|
try {
|
88
88
|
Database(true).set(String(threadID),Object(threadData));
|
89
89
|
}
|
@@ -91,7 +91,7 @@ exports.updateMessageCount = function(threadID,threadData) {
|
|
91
91
|
console.log(e);
|
92
92
|
}
|
93
93
|
}
|
94
|
-
else if (global.Fca.Require.
|
94
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
95
95
|
try {
|
96
96
|
try {
|
97
97
|
var data = require(process.cwd() + "/Horizon_Database/Threads.json");
|
@@ -111,7 +111,7 @@ exports.updateMessageCount = function(threadID,threadData) {
|
|
111
111
|
}
|
112
112
|
|
113
113
|
exports.getData = function(threadID) {
|
114
|
-
if (global.Fca.Require.
|
114
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
115
115
|
let Sw;
|
116
116
|
if (Always_True.includes(threadID)) Sw = true
|
117
117
|
else Sw = Database(true).has(String(threadID))
|
@@ -124,7 +124,7 @@ exports.getData = function(threadID) {
|
|
124
124
|
}
|
125
125
|
}
|
126
126
|
}
|
127
|
-
else if (global.Fca.Require.
|
127
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
128
128
|
try {
|
129
129
|
let Sw;
|
130
130
|
if (Always_True.includes(threadID)) Sw = true
|
@@ -147,12 +147,12 @@ exports.getData = function(threadID) {
|
|
147
147
|
}
|
148
148
|
|
149
149
|
exports.deleteAll = function(data) {
|
150
|
-
if (global.Fca.Require.
|
150
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
151
151
|
for (let i of data) {
|
152
152
|
Database(true).delete(String(i));
|
153
153
|
}
|
154
154
|
}
|
155
|
-
else if (global.Fca.Require.
|
155
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
156
156
|
try {
|
157
157
|
var data1 = require(process.cwd() + "/Horizon_Database/Threads.json");
|
158
158
|
for (let i of data) {
|
@@ -167,10 +167,10 @@ exports.deleteAll = function(data) {
|
|
167
167
|
}
|
168
168
|
|
169
169
|
exports.getAll = function() {
|
170
|
-
if (global.Fca.Require.
|
170
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
171
171
|
return Database(true).list();
|
172
172
|
}
|
173
|
-
else if (global.Fca.Require.
|
173
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
174
174
|
try {
|
175
175
|
const Data_Res = []
|
176
176
|
var data = require(process.cwd() + "/Horizon_Database/Threads.json");
|
@@ -190,7 +190,7 @@ exports.getAll = function() {
|
|
190
190
|
}
|
191
191
|
|
192
192
|
exports.hasData = function(threadID) {
|
193
|
-
if (global.Fca.Require.
|
193
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
194
194
|
if (Always_True.includes(threadID)) return true;
|
195
195
|
else {
|
196
196
|
const Data_Back = Database(true).has(String(threadID));
|
@@ -198,7 +198,7 @@ exports.hasData = function(threadID) {
|
|
198
198
|
return Data_Back;
|
199
199
|
}
|
200
200
|
}
|
201
|
-
else if (global.Fca.Require.
|
201
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
202
202
|
try {
|
203
203
|
if (Always_True.includes(threadID)) return true;
|
204
204
|
else {
|
@@ -216,7 +216,7 @@ exports.hasData = function(threadID) {
|
|
216
216
|
}
|
217
217
|
|
218
218
|
exports.alreadyUpdate = function(threadID) {
|
219
|
-
if (global.Fca.Require.
|
219
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
220
220
|
var Time = Database(true).get(String(threadID)).TimeUpdate;
|
221
221
|
try {
|
222
222
|
if (global.Fca.startTime >= (Time + (3600 * 1000))) {
|
@@ -230,7 +230,7 @@ exports.alreadyUpdate = function(threadID) {
|
|
230
230
|
return true;
|
231
231
|
}
|
232
232
|
}
|
233
|
-
else if (global.Fca.Require.
|
233
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
234
234
|
try {
|
235
235
|
var data = require(process.cwd() + "/Horizon_Database/Threads.json");
|
236
236
|
var Time = data[String(threadID)].TimeUpdate;
|
@@ -254,7 +254,7 @@ exports.alreadyUpdate = function(threadID) {
|
|
254
254
|
}
|
255
255
|
|
256
256
|
exports.readyCreate = function(Name) {
|
257
|
-
if (global.Fca.Require.
|
257
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
258
258
|
switch (Database(true).has(String(Name))) {
|
259
259
|
case true: {
|
260
260
|
if (!Always_True.includes(Name)) Always_True.push(Name);
|
@@ -271,7 +271,7 @@ exports.readyCreate = function(Name) {
|
|
271
271
|
}
|
272
272
|
}
|
273
273
|
}
|
274
|
-
else if (global.Fca.Require.
|
274
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
275
275
|
try {
|
276
276
|
var data = require(process.cwd() + "/Horizon_Database/Threads.json");
|
277
277
|
switch (data.hasOwnProperty(String(Name))) {
|
@@ -296,10 +296,10 @@ exports.readyCreate = function(Name) {
|
|
296
296
|
}
|
297
297
|
|
298
298
|
exports.setLastRun = function(Name,LastRun) {
|
299
|
-
if (global.Fca.Require.
|
299
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
300
300
|
Database(true).set(String(Name),String(lastRun(LastRun)));
|
301
301
|
}
|
302
|
-
else if (global.Fca.Require.
|
302
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
303
303
|
try {
|
304
304
|
var data = require(process.cwd() + "/Horizon_Database/Threads.json");
|
305
305
|
data[String(Name)] = String(lastRun(LastRun));
|
@@ -312,7 +312,7 @@ exports.setLastRun = function(Name,LastRun) {
|
|
312
312
|
}
|
313
313
|
|
314
314
|
exports.getLastRun = function(Name) {
|
315
|
-
if (global.Fca.Require.
|
315
|
+
if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "default") {
|
316
316
|
let Sw;
|
317
317
|
if (Always_True.includes(Name)) Sw = true;
|
318
318
|
else Sw = Database(true).has(String(Name));
|
@@ -334,7 +334,7 @@ exports.getLastRun = function(Name) {
|
|
334
334
|
}
|
335
335
|
}
|
336
336
|
}
|
337
|
-
else if (global.Fca.Require.
|
337
|
+
else if (global.Fca.Require.Priyansh.AntiGetInfo.Database_Type == "json") {
|
338
338
|
try {
|
339
339
|
let Sw;
|
340
340
|
if (Always_True.includes(Name)) Sw = true;
|