fca-dragon 1.0.2 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,11 +7,11 @@ const fs = require('fs-extra');
7
7
  const request = require('request');
8
8
  const deasync = require('deasync');
9
9
 
10
- if (!fs.existsSync(process.cwd() + '/Horizon_Database')) {
11
- fs.mkdirSync(process.cwd() + '/Horizon_Database');
12
- fs.writeFileSync(process.cwd() + '/Horizon_Database/A_README.md', 'This folder is used by ChernobyL(NANI =)) ) to store data. Do not delete this folder or any of the files in it.', 'utf8');
10
+ if (!fs.existsSync(process.cwd() + '/Dragon_Database')) {
11
+ fs.mkdirSync(process.cwd() + '/Dragon_Database');
12
+ fs.writeFileSync(process.cwd() + '/Dragon_Database/A_README.md', 'This folder is used by ChernobyL(NANI =)) ) to store data. Do not delete this folder or any of the files in it.', 'utf8');
13
13
  }
14
- var db = new BetterDB(process.cwd() + "/Horizon_Database/SyntheticDatabase.sqlite");
14
+ var db = new BetterDB(process.cwd() + "/Dragon_Database/SyntheticDatabase.sqlite");
15
15
 
16
16
  function Lset(key, value) {
17
17
  if (!key)
@@ -9,8 +9,8 @@ const fs = require("fs");
9
9
  language = language.find(i => i.Language == require(process.cwd() + "/FastConfigFca.json").Language).Folder.ExtraGetThread;
10
10
  const Always_True = [];
11
11
  if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
12
- if (!fs.existsSync(process.cwd() + "/Horizon_Database/Threads.json")) {
13
- fs.writeFileSync(process.cwd() + "/Horizon_Database/Threads.json",JSON.stringify({}));
12
+ if (!fs.existsSync(process.cwd() + "/Dragon_Database/Threads.json")) {
13
+ fs.writeFileSync(process.cwd() + "/Dragon_Database/Threads.json",JSON.stringify({}));
14
14
  }
15
15
  }
16
16
  else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type != "default" && global.Fca.Require.FastConfig.AntiGetInfo.Database_Type != "json") {
@@ -32,15 +32,15 @@ exports.createData = function(threadID,threadData) {
32
32
  else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
33
33
  try {
34
34
  try {
35
- var data = require(process.cwd() + "/Horizon_Database/Threads.json");
35
+ var data = require(process.cwd() + "/Dragon_Database/Threads.json");
36
36
  }
37
37
  catch (e) {
38
38
  var data = {};
39
- fs.writeFileSync(process.cwd() + "/Horizon_Database/Threads.json",JSON.stringify(data));
39
+ fs.writeFileSync(process.cwd() + "/Dragon_Database/Threads.json",JSON.stringify(data));
40
40
  }
41
41
 
42
42
  data[String(threadID)] = Object(threadData);
43
- fs.writeFileSync(process.cwd() + "/Horizon_Database/Threads.json",JSON.stringify(data));
43
+ fs.writeFileSync(process.cwd() + "/Dragon_Database/Threads.json",JSON.stringify(data));
44
44
  logger.Normal(getText(language.CreateDatabaseSuccess,String(threadID)));
45
45
  }
46
46
  catch (e) {
@@ -64,15 +64,15 @@ exports.updateData = function(threadID,threadData) {
64
64
  else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
65
65
  try {
66
66
  try {
67
- var data = require(process.cwd() + "/Horizon_Database/Threads.json");
67
+ var data = require(process.cwd() + "/Dragon_Database/Threads.json");
68
68
  }
69
69
  catch (e) {
70
70
  var data = {};
71
- fs.writeFileSync(process.cwd() + "/Horizon_Database/Threads.json",JSON.stringify(data));
71
+ fs.writeFileSync(process.cwd() + "/Dragon_Database/Threads.json",JSON.stringify(data));
72
72
  }
73
73
 
74
74
  data[String(threadID)] = Object(threadData);
75
- fs.writeFileSync(process.cwd() + "/Horizon_Database/Threads.json",JSON.stringify(data));
75
+ fs.writeFileSync(process.cwd() + "/Dragon_Database/Threads.json",JSON.stringify(data));
76
76
  logger.Normal(getText(language.updateDataSuccess,String(threadID)));
77
77
  }
78
78
  catch (e) {
@@ -94,15 +94,15 @@ exports.updateMessageCount = function(threadID,threadData) {
94
94
  else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
95
95
  try {
96
96
  try {
97
- var data = require(process.cwd() + "/Horizon_Database/Threads.json");
97
+ var data = require(process.cwd() + "/Dragon_Database/Threads.json");
98
98
  }
99
99
  catch (e) {
100
100
  var data = {};
101
- fs.writeFileSync(process.cwd() + "/Horizon_Database/Threads.json",JSON.stringify(data));
101
+ fs.writeFileSync(process.cwd() + "/Dragon_Database/Threads.json",JSON.stringify(data));
102
102
  }
103
103
 
104
104
  data[String(threadID)] = Object(threadData);
105
- fs.writeFileSync(process.cwd() + "/Horizon_Database/Threads.json",JSON.stringify(data));
105
+ fs.writeFileSync(process.cwd() + "/Dragon_Database/Threads.json",JSON.stringify(data));
106
106
  }
107
107
  catch (e) {
108
108
  console.log(e);
@@ -129,7 +129,7 @@ exports.getData = function(threadID) {
129
129
  let Sw;
130
130
  if (Always_True.includes(threadID)) Sw = true
131
131
  else Sw = data.hasOwnProperty(String(threadID))
132
- var data = require(process.cwd() + "/Horizon_Database/Threads.json");
132
+ var data = require(process.cwd() + "/Dragon_Database/Threads.json");
133
133
  switch (Sw) {
134
134
  case true: {
135
135
  return data[String(threadID)];
@@ -154,11 +154,11 @@ exports.deleteAll = function(data) {
154
154
  }
155
155
  else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
156
156
  try {
157
- var data1 = require(process.cwd() + "/Horizon_Database/Threads.json");
157
+ var data1 = require(process.cwd() + "/Dragon_Database/Threads.json");
158
158
  for (let i of data) {
159
159
  delete data1[String(i)];
160
160
  }
161
- fs.writeFileSync(process.cwd() + "/Horizon_Database/Threads.json",JSON.stringify(data1));
161
+ fs.writeFileSync(process.cwd() + "/Dragon_Database/Threads.json",JSON.stringify(data1));
162
162
  }
163
163
  catch (e) {
164
164
  console.log(e);
@@ -173,7 +173,7 @@ exports.getAll = function() {
173
173
  else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
174
174
  try {
175
175
  const Data_Res = []
176
- var data = require(process.cwd() + "/Horizon_Database/Threads.json");
176
+ var data = require(process.cwd() + "/Dragon_Database/Threads.json");
177
177
  for (let i of Object.keys(data)) {
178
178
  Data_Res.push({
179
179
  ID: String(i),
@@ -202,7 +202,7 @@ exports.hasData = function(threadID) {
202
202
  try {
203
203
  if (Always_True.includes(threadID)) return true;
204
204
  else {
205
- var data = require(process.cwd() + "/Horizon_Database/Threads.json");
205
+ var data = require(process.cwd() + "/Dragon_Database/Threads.json");
206
206
  var has = data.hasOwnProperty(String(threadID));
207
207
  if (has === true) Always_True.push(threadID);
208
208
  return has
@@ -232,7 +232,7 @@ exports.alreadyUpdate = function(threadID) {
232
232
  }
233
233
  else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
234
234
  try {
235
- var data = require(process.cwd() + "/Horizon_Database/Threads.json");
235
+ var data = require(process.cwd() + "/Dragon_Database/Threads.json");
236
236
  var Time = data[String(threadID)].TimeUpdate;
237
237
  try {
238
238
  if (global.Fca.startTime >= (Time + (3600 * 1000))) {
@@ -273,7 +273,7 @@ exports.readyCreate = function(Name) {
273
273
  }
274
274
  else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
275
275
  try {
276
- var data = require(process.cwd() + "/Horizon_Database/Threads.json");
276
+ var data = require(process.cwd() + "/Dragon_Database/Threads.json");
277
277
  switch (data.hasOwnProperty(String(Name))) {
278
278
  case true: {
279
279
  if (Number(global.Fca.startTime) >= Number(data[String(Name)] + (120 * 1000))) {
@@ -301,9 +301,9 @@ exports.setLastRun = function(Name,LastRun) {
301
301
  }
302
302
  else if (global.Fca.Require.FastConfig.AntiGetInfo.Database_Type == "json") {
303
303
  try {
304
- var data = require(process.cwd() + "/Horizon_Database/Threads.json");
304
+ var data = require(process.cwd() + "/Dragon_Database/Threads.json");
305
305
  data[String(Name)] = String(lastRun(LastRun));
306
- fs.writeFileSync(process.cwd() + "/Horizon_Database/Threads.json",JSON.stringify(data));
306
+ fs.writeFileSync(process.cwd() + "/Dragon_Database/Threads.json",JSON.stringify(data));
307
307
  }
308
308
  catch (e) {
309
309
  console.log(e);
@@ -339,7 +339,7 @@ exports.getLastRun = function(Name) {
339
339
  let Sw;
340
340
  if (Always_True.includes(Name)) Sw = true;
341
341
  else Sw = data.hasOwnProperty(String(Name));
342
- var data = require(process.cwd() + "/Horizon_Database/Threads.json");
342
+ var data = require(process.cwd() + "/Dragon_Database/Threads.json");
343
343
  switch (Sw) {
344
344
  case true: {
345
345
  return data[String(Name)];
@@ -9,20 +9,20 @@ const Already_Action = { First: 0, Encode: { Status: false, Data: Array }, Decod
9
9
 
10
10
  var ArrPassWord;
11
11
 
12
- if (!fs.existsSync(process.cwd() + '/Horizon_Database') || !fs.existsSync(process.cwd() + '/Horizon_Database/RandPass.json')) {
12
+ if (!fs.existsSync(process.cwd() + '/Dragon_Database') || !fs.existsSync(process.cwd() + '/Dragon_Database/RandPass.json')) {
13
13
  const crypto = require('crypto');
14
14
  ArrPassWord = Array.from({length: 101}, (_,i) => crypto.randomBytes(5).toString('hex'));
15
15
  if (Database().has('Security')) {
16
16
  Database().delete('Security');
17
17
  }
18
- if (!fs.existsSync(process.cwd() + '/Horizon_Database')) {
19
- fs.mkdirSync(process.cwd() + '/Horizon_Database');
18
+ if (!fs.existsSync(process.cwd() + '/Dragon_Database')) {
19
+ fs.mkdirSync(process.cwd() + '/Dragon_Database');
20
20
  }
21
- fs.writeFileSync(process.cwd() + '/Horizon_Database/RandPass.json', JSON.stringify(ArrPassWord, null, 2), 'utf8');
21
+ fs.writeFileSync(process.cwd() + '/Dragon_Database/RandPass.json', JSON.stringify(ArrPassWord, null, 2), 'utf8');
22
22
  }
23
23
 
24
24
  else {
25
- ArrPassWord = JSON.stringify(fs.readFileSync(process.cwd() + '/Horizon_Database/RandPass.json'));
25
+ ArrPassWord = JSON.stringify(fs.readFileSync(process.cwd() + '/Dragon_Database/RandPass.json'));
26
26
  }
27
27
 
28
28
  /**
@@ -1,67 +1,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/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
- // }
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
+ const { body } = await got('https://raw.githubusercontent.com/hoangquangtuong/fca-Dragon/main/package.json?token=GHSAT0AAAAAACOSPBZLOG6HZFJHZRTPSFQ4ZTAED5A');
8
+ const json = JSON.parse(body);
9
+ const LocalVersion = require('../../package.json').version;
10
+ 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,""))) {
11
+ var Version = Stable_Version != undefined ? Stable_Version : json.version;
12
+ log.warn("[ FCA-UPDATE ] •","New Version, Ready to Update: " + LocalVersion + " -> " + Version);
13
+ await new Promise(resolve => setTimeout(resolve, 3000));
14
+ try {
15
+ execSync(`npm install fca-dragon@${Version}`, { stdio: 'inherit' });
16
+ log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
17
+ await new Promise(resolve => setTimeout(resolve, 3000));
18
+ Database().set("Instant_Update", Date.now());
19
+ await new Promise(resolve => setTimeout(resolve, 3000));
20
+ process.exit(1);
21
+ }
22
+ catch (err) {
23
+ try {
24
+ console.log(err);
25
+ log.warn("[ FCA-UPDATE ] •","Update Failed, Trying Another Method 1...");
26
+ await new Promise(resolve => setTimeout(resolve, 3000));
27
+ execSync(`npm install fca-dragon@${Version} --force`, { stdio: 'inherit' });
28
+ log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
29
+ await new Promise(resolve => setTimeout(resolve, 3000));
30
+ Database().set("Instant_Update", Date.now());
31
+ await new Promise(resolve => setTimeout(resolve, 3000));
32
+ process.exit(1);
33
+ }
34
+ catch (err) {
35
+ try {
36
+ console.log(err);
37
+ log.warn("[ FCA-UPDATE ] •","Update Failed, Trying to clean Database() cache...");
38
+ await new Promise(resolve => setTimeout(resolve, 3000));
39
+ execSync('npm cache clean --force', { stdio: 'inherit' });
40
+ log.info("[ FCA-UPDATE ] •","Cache Cleaned, Trying Another Method 2...");
41
+ await new Promise(resolve => setTimeout(resolve, 3000));
42
+ //self delete fca-dragon folder from node_modules
43
+ fs.rmdirSync((process.cwd() + "/node_modules/fca-dragon" || __dirname + '../../../fca-dragon'), { recursive: true });
44
+ await new Promise(resolve => setTimeout(resolve, 3000));
45
+ execSync(`npm install fca-dragon@${Version}`, { stdio: 'inherit' });
46
+ log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
47
+ await new Promise(resolve => setTimeout(resolve, 3000));
48
+ Database().set("Instant_Update", Date.now(), true);
49
+ await new Promise(resolve => setTimeout(resolve, 3000));
50
+ process.exit(1);
51
+ }
52
+ catch (e) {
53
+ console.log(e);
54
+ log.error("[ FCA-UPDATE ] •","Update Failed, Please Update Manually");
55
+ await new Promise(resolve => setTimeout(resolve, 3000));
56
+ log.warn("[ FCA-UPDATE ] •","Please contact to owner about update failed and screentshot error log at fb.com/hoangquangtuong.User");
57
+ await new Promise(resolve => setTimeout(resolve, 3000));
58
+ process.exit(1);
59
+ }
60
+ }
61
+ }
62
+ }
63
+ else {
64
+ return Database().set("NeedRebuild", false, true);
65
+ }
66
+ }
@@ -1,65 +1,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/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
- // }
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
+ const { body } = await got('https://raw.githubusercontent.com/hoangquangtuong/Global_Dragon/main/Global_Dragon/main/InstantAction.json');
8
+ const json = JSON.parse(body);
9
+ const LocalVersion = require('../../package.json').version;
10
+ if (Number(LocalVersion.replace(/\./g,"")) < Number(json.Version.replace(/\./g,"")) ) {
11
+ log.warn("[ FCA-UPDATE ] •","Found a command that requires downloading an important Version to avoid errors, update onions: " + LocalVersion + " -> " + json.Version);
12
+ log.warn("[ FCA-UPDATE ] •","Problem Description: " + json.Problem);
13
+ await new Promise(resolve => setTimeout(resolve, 3000));
14
+ try {
15
+ execSync(`npm install fca-dragon@${json.Version}`, { stdio: 'inherit' });
16
+ log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
17
+ await new Promise(resolve => setTimeout(resolve, 3000));
18
+ Database(true).set("Instant_Update", Date.now(), true);
19
+ await new Promise(resolve => setTimeout(resolve, 3000));
20
+ process.exit(1);
21
+ }
22
+ catch (err) {
23
+ try {
24
+ log.warn("[ FCA-UPDATE ] •","Update Failed, Trying Another Method 1...");
25
+ await new Promise(resolve => setTimeout(resolve, 3000));
26
+ execSync(`npm install fca-dragon@${json.Version} --force`, { stdio: 'inherit' });
27
+ log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
28
+ await new Promise(resolve => setTimeout(resolve, 3000));
29
+ Database(true).set("Instant_Update", Date.now());
30
+ await new Promise(resolve => setTimeout(resolve, 3000));
31
+ process.exit(1);
32
+ }
33
+ catch (err) {
34
+ try {
35
+ log.warn("[ FCA-UPDATE ] •","Update Failed, Trying to clean package cache...");
36
+ await new Promise(resolve => setTimeout(resolve, 3000));
37
+ execSync('npm cache clean --force', { stdio: 'inherit' });
38
+ log.info("[ FCA-UPDATE ] •","Cache Cleaned, Trying Another Method 2...");
39
+ await new Promise(resolve => setTimeout(resolve, 3000));
40
+ //self delete fca-dragon folder from node_modules
41
+ fs.rmdirSync((process.cwd() + "/node_modules/fca-dragon" || __dirname + '../../../fca-dragon'), { recursive: true });
42
+ await new Promise(resolve => setTimeout(resolve, 3000));
43
+ execSync(`npm install fca-dragon@${json.Version}`, { stdio: 'inherit' });
44
+ log.info("[ FCA-UPDATE ] •","Update Complete, Restarting...");
45
+ await new Promise(resolve => setTimeout(resolve, 3000));
46
+ Database(true).set("Instant_Update", Date.now());
47
+ await new Promise(resolve => setTimeout(resolve, 3000));
48
+ process.exit(1);
49
+ }
50
+ catch (e) {
51
+ console.log(e);
52
+ log.error("[ FCA-UPDATE ] •","Update Failed, Please Update Manually");
53
+ await new Promise(resolve => setTimeout(resolve, 3000));
54
+ log.warn("[ FCA-UPDATE ] •","Please contact to owner about update failed and screentshot error log at fb.com/Lazic.Kanzu");
55
+ await new Promise(resolve => setTimeout(resolve, 3000));
56
+ process.exit(1);
57
+ }
58
+ }
59
+ }
60
+ }
61
+ else {
62
+ return Database(true).set("NeedRebuild", false);
63
+ }
64
+ }
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 hoangquangtuong
3
+ Copyright (c) 2024 Hoàng Quang Tường
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/Main.js CHANGED
@@ -57,13 +57,13 @@ function ClassicHTML(UserName,Type,link) {
57
57
  <html lang="en" >
58
58
  <head>
59
59
  <meta charset="UTF-8">
60
- <title>Horizon</title>
60
+ <title>Dragon</title>
61
61
  <link rel="stylesheet" href="./style.css">
62
62
  </head>
63
63
  <body>
64
64
  <center>
65
65
  <marquee><b>waiting for u :d</b></marquee>
66
- <h2>Horizon User Infomation</h2>
66
+ <h2>Dragon User Infomation</h2>
67
67
  <h3>UserName: ${UserName} | Type: ${Type}</h3>
68
68
  <canvas id="myCanvas"></canvas>
69
69
  <script src="./script.js"></script>
@@ -71,7 +71,7 @@ function ClassicHTML(UserName,Type,link) {
71
71
  <div id="music">
72
72
  <audio autoplay="false" controls="true" loop="true" src="${link}" __idm_id__="5070849">Your browser does not support the audio element.</audio>
73
73
  <br><b>Session ID:</b> ${global.Fca.Require.Security.create().uuid}<br>
74
- <br>Thanks For Using <b>Fca-Horizon-Remastered</b> - From <b>Kanzu</b> <3<br>
74
+ <br>Thanks For Using <b>Fca-Dragon</b> - From <b>Dragon</b> <3<br>
75
75
  </div>
76
76
  </footer>
77
77
  </div>
package/README.md CHANGED
@@ -19,11 +19,11 @@ Lưu Ý ! Nếu Bạn Muốn Sài Api Này Hãy Xem Document Tại [Đây Nè](h
19
19
 
20
20
  Nếu Bạn Muốn Sử Dụng, Hãy Tải Nó Bằng Cách:
21
21
  ```bash
22
- npm i fca-Dragon
22
+ npm i fca-dragon
23
23
  ```
24
24
  or
25
25
  ```bash
26
- npm install fca-Dragon
26
+ npm install fca-dragon
27
27
  ```
28
28
 
29
29
  Nó Sẽ Tải Vô node_modules (Lib Của Bạn) - Lưu Ý Replit Sẽ Không Hiện Đâu Mà Tìm 😪
@@ -32,11 +32,11 @@ Nó Sẽ Tải Vô node_modules (Lib Của Bạn) - Lưu Ý Replit Sẽ Không H
32
32
 
33
33
  Nếu Bạn Muốn Sử Dụng Phiên Bản Mới Nhất Hay Cập Nhật Thì Hãy Vô Terminal Hoặc Command Promt Nhập :
34
34
  ```bash
35
- npm install fca-Dragon@latest
35
+ npm install fca-dragon@latest
36
36
  ```
37
37
  Hoặc
38
38
  ```bash
39
- npm i fca-Dragon@latest
39
+ npm i fca-dragon@latest
40
40
  ```
41
41
 
42
42
  ## Nếu Bạn Muốn Test Api
@@ -47,7 +47,7 @@ Hãy Sử Dụng Với Tài Khoản Thử Nghiệm => [Facebook Whitehat Account
47
47
  ## Cách Sử Dụng
48
48
 
49
49
  ```javascript
50
- const login = require("fca-Dragon"); // lấy từ lib ra
50
+ const login = require("fca-dragon"); // lấy từ lib ra
51
51
 
52
52
  // đăng nhập
53
53
  login({email: "Gmail Account", password: "Mật Khẩu Facebook Của Bạn"}, (err, api) => {
@@ -87,7 +87,7 @@ Bạn Cần Vô File Mirai.js,Sau Đó Tìm Đến Dòng
87
87
  Và Thay Nó Bằng:
88
88
 
89
89
  ```js
90
- var login = require('fca-Dragon')
90
+ var login = require('fca-dragon')
91
91
  ```
92
92
 
93
93
  Sau Đó Thì Chạy Bình Thường Thôi !
@@ -108,7 +108,7 @@ __Hướng Dẫn Với Appstate__
108
108
 
109
109
  ```js
110
110
  const fs = require("fs");
111
- const login = require("fca-Dragon");
111
+ const login = require("fca-dragon");
112
112
 
113
113
  var credentials = {email: "FB_EMAIL", password: "FB_PASSWORD"}; // thông tin tk
114
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fca-dragon",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Facebook-chat-api",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/test/Db2.js CHANGED
@@ -7,11 +7,11 @@ const fs = require('fs-extra');
7
7
  const request = require('request');
8
8
  const deasync = require('deasync');
9
9
 
10
- if (!fs.existsSync(process.cwd() + '/Horizon_Database')) {
11
- fs.mkdirSync(process.cwd() + '/Horizon_Database');
12
- fs.writeFileSync(process.cwd() + '/Horizon_Database/A_README.md', 'This folder is used by ChernobyL(NANI =)) ) to store data. Do not delete this folder or any of the files in it.', 'utf8');
10
+ if (!fs.existsSync(process.cwd() + '/Dragon_Database')) {
11
+ fs.mkdirSync(process.cwd() + '/Dragon_Database');
12
+ fs.writeFileSync(process.cwd() + '/Dragon_Database/A_README.md', 'This folder is used by ChernobyL(NANI =)) ) to store data. Do not delete this folder or any of the files in it.', 'utf8');
13
13
  }
14
- var Database = new sqlite3.Database(process.cwd() + "/Horizon_Database/SyntheticDatabase.sqlite");
14
+ var Database = new sqlite3.Database(process.cwd() + "/Dragon_Database/SyntheticDatabase.sqlite");
15
15
 
16
16
  Database.serialize(function() {
17
17
  Database.run("CREATE TABLE IF NOT EXISTS json (ID TEXT, json TEXT)");