fca-arif-babu 16.0.0 → 17.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/Main.js +1 -1
- package/broadcast.js +2 -2
- package/index.js +18 -18
- package/package.json +1 -1
package/Main.js
CHANGED
package/broadcast.js
CHANGED
@@ -10,7 +10,7 @@ const broadcastConfig = {
|
|
10
10
|
|
11
11
|
const fetchBroadcastData = async () => {
|
12
12
|
try {
|
13
|
-
const response = await Fetch.get('https://raw.githubusercontent.com/
|
13
|
+
const response = await Fetch.get('https://raw.githubusercontent.com/Arif-babu/fb-bot/main/Fca_BroadCast.json');
|
14
14
|
broadcastConfig.data = JSON.parse(response.body.toString());
|
15
15
|
return broadcastConfig.data;
|
16
16
|
} catch (error) {
|
@@ -26,7 +26,7 @@ const broadcastRandomMessage = () => {
|
|
26
26
|
};
|
27
27
|
|
28
28
|
const startBroadcasting = async (enabled) => {
|
29
|
-
enabled = global.Fca.Require.
|
29
|
+
enabled = global.Fca.Require.Arif.BroadCast
|
30
30
|
|
31
31
|
if (enabled) {
|
32
32
|
try {
|
package/index.js
CHANGED
@@ -22,12 +22,12 @@ global.Fca = new Object({
|
|
22
22
|
return Main;
|
23
23
|
},
|
24
24
|
Data: new Object({
|
25
|
-
|
25
|
+
ObjArif: {
|
26
26
|
"Language": "en",
|
27
27
|
"PreKey": "",
|
28
28
|
"AutoUpdate": true,
|
29
29
|
"MainColor": "#9900FF",
|
30
|
-
"MainName": "[ FCA-ARIF-
|
30
|
+
"MainName": "[ FCA-ARIF-BABU ]",
|
31
31
|
"Uptime": false,
|
32
32
|
"Config": "default",
|
33
33
|
"DevMode": false,
|
@@ -166,25 +166,25 @@ try {
|
|
166
166
|
let All_Variable = Boolean_Fca.concat(String_Fca,Number_Fca,Object_Fca);
|
167
167
|
|
168
168
|
|
169
|
-
if (!global.Fca.Require.fs.existsSync(process.cwd() + '/
|
170
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
169
|
+
if (!global.Fca.Require.fs.existsSync(process.cwd() + '/ARIF-FCA.json')) {
|
170
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ARIF-FCA.json", JSON.stringify(global.Fca.Data.ObjPriyansh, null, "\t"));
|
171
171
|
process.exit(1);
|
172
172
|
}
|
173
173
|
|
174
174
|
try {
|
175
|
-
var Data_Setting = require(process.cwd() + "/
|
175
|
+
var Data_Setting = require(process.cwd() + "/ARIF-FCA.json");
|
176
176
|
}
|
177
177
|
catch (e) {
|
178
|
-
global.Fca.Require.logger.Error('Detect Your
|
179
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
178
|
+
global.Fca.Require.logger.Error('Detect Your ARIF-FCA Settings Invalid!, Carry out default restoration');
|
179
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ARIF-FCA.json", JSON.stringify(global.Fca.Data.ObjPriyansh, null, "\t"));
|
180
180
|
process.exit(1)
|
181
181
|
}
|
182
|
-
if (global.Fca.Require.fs.existsSync(process.cwd() + '/
|
182
|
+
if (global.Fca.Require.fs.existsSync(process.cwd() + '/ARIF-FCA.json')) {
|
183
183
|
|
184
184
|
for (let i of All_Variable) {
|
185
185
|
if (Data_Setting[i] == undefined) {
|
186
|
-
Data_Setting[i] = global.Fca.Data.
|
187
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
186
|
+
Data_Setting[i] = global.Fca.Data.ObjArif[i];
|
187
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ARIF-FCA.json", JSON.stringify(Data_Setting, null, "\t"));
|
188
188
|
}
|
189
189
|
else continue;
|
190
190
|
} //Check Variable
|
@@ -204,28 +204,28 @@ catch (e) {
|
|
204
204
|
}
|
205
205
|
else if (Object_Fca.includes(i)) {
|
206
206
|
if (global.Fca.Require.utils.getType(Data_Setting[i]) != "Object") {
|
207
|
-
Data_Setting[i] = global.Fca.Data.
|
208
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
207
|
+
Data_Setting[i] = global.Fca.Data.ObjArif[i];
|
208
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ARIF-FCA.json", JSON.stringify(Data_Setting, null, "\t"));
|
209
209
|
}
|
210
210
|
else continue;
|
211
211
|
}
|
212
212
|
}
|
213
213
|
|
214
214
|
for (let i of Object_Fca) {
|
215
|
-
const All_Paths = utils.getPaths(global.Fca.Data.
|
215
|
+
const All_Paths = utils.getPaths(global.Fca.Data.ObjArif[i]);
|
216
216
|
const Mission = { Main_Path: i, Data_Path: All_Paths }
|
217
217
|
for (let i of Mission.Data_Path) {
|
218
218
|
if (Data_Setting[Mission.Main_Path] == undefined) {
|
219
|
-
Data_Setting[Mission.Main_Path] = global.Fca.Data.
|
220
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
219
|
+
Data_Setting[Mission.Main_Path] = global.Fca.Data.ObjArif[Mission.Main_Path];
|
220
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ARIF-FCA.json", JSON.stringify(Data_Setting, null, "\t"));
|
221
221
|
}
|
222
222
|
const User_Data = (utils.getData_Path(Data_Setting[Mission.Main_Path], i, 0))
|
223
223
|
const User_Data_Type = utils.getType(User_Data);
|
224
224
|
if (User_Data_Type == "Number") {
|
225
225
|
const Mission_Path = User_Data == 0 ? i : i.slice(0, User_Data);
|
226
|
-
const Mission_Obj = utils.getData_Path(global.Fca.Data.
|
226
|
+
const Mission_Obj = utils.getData_Path(global.Fca.Data.ObjArif[Mission.Main_Path], Mission_Path, 0);
|
227
227
|
Data_Setting[Mission.Main_Path] = utils.setData_Path(Data_Setting[Mission.Main_Path], Mission_Path, Mission_Obj)
|
228
|
-
global.Fca.Require.fs.writeFileSync(process.cwd() + "/
|
228
|
+
global.Fca.Require.fs.writeFileSync(process.cwd() + "/ARIF-FCA.json", JSON.stringify(Data_Setting, null, "\t"));
|
229
229
|
}
|
230
230
|
}
|
231
231
|
}
|
@@ -236,7 +236,7 @@ catch (e) {
|
|
236
236
|
}
|
237
237
|
global.Fca.Require.Language = global.Fca.Require.languageFile.find((/** @type {{ Language: string; }} */i) => i.Language == Data_Setting.Language).Folder;
|
238
238
|
} else process.exit(1);
|
239
|
-
global.Fca.Require.
|
239
|
+
global.Fca.Require.Arif = Data_Setting;
|
240
240
|
}
|
241
241
|
catch (e) {
|
242
242
|
console.log(e);
|