-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.js
34 lines (31 loc) · 909 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
( ꈍᴗꈍ) DEV: REJARD BENTAZAR
* CREDITS TO:
** AIZENTEL
**NTKANG
** FCA-UNOFFICIAL
*/
const chalk = require('chalk');
const { spawn } = require("child_process");
const path = require('path');
const YAFB_SYSTEM = "auto.js";
const YAFB_CORE = path.join(__dirname, YAFB_SYSTEM);
console.log(chalk.green('[SUCCES] - OctobotRemake is Now Ready to Use'));
function start() {
const main = spawn("node", [YAFB_SYSTEM], {
cwd: __dirname,
stdio: "inherit",
shell: true
});
main.on("close", (exitCode) => {
if (exitCode === 0) {
console.log(chalk.red('YAFB MAIN SYSTEM CLOSE!'));
} else if (exitCode === 1) {
console.log(chalk.red('YAFB MAIN SYSTEM RESTARTING PLS WAIT!'));
start();
} else {
console.error(`Main process exited with code ${exitCode}`);
}
});
}
start();