webfast 0.1.79 → 0.1.80
Sign up to get free protection for your applications and to get access to all the features.
@@ -441,12 +441,22 @@ module.exports = async function(program,folder) {
|
|
441
441
|
|
442
442
|
// Process scripts
|
443
443
|
let scriptsPath = program.path.join(__dirname,`telegram`,`scripts`);
|
444
|
+
// Loop Through scripts folder
|
445
|
+
let scriptsData = await program.modules.walkDirectory(scriptsPath);
|
446
|
+
let secPath;
|
444
447
|
if (program.set.path != undefined) {
|
445
|
-
|
448
|
+
// Get extra data
|
449
|
+
|
450
|
+
secPath = program.path.join(program.set.path,`bots`,`telegram`,`scripts`);
|
451
|
+
secData = await program.modules.walkDirectory(secPath);
|
452
|
+
|
453
|
+
// Concat scsriptsdata with secData
|
454
|
+
if (secData.length > 0) {
|
455
|
+
const combinedArray = scriptsData.concat(secData);
|
456
|
+
scriptsData = combinedArray;
|
457
|
+
}
|
446
458
|
}
|
447
459
|
|
448
|
-
// Loop Through scripts folder
|
449
|
-
let scriptsData = await program.modules.walkDirectory(scriptsPath);
|
450
460
|
|
451
461
|
// Let's loop througha and if no extension it's folder
|
452
462
|
let allScripts = {
|