mirror of
https://github.com/HirziDevs/PteroStats
synced 2026-05-22 15:51:52 +00:00
Update index.js
This commit is contained in:
7
index.js
7
index.js
@@ -1,4 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const child = require("child_process")
|
||||
|
||||
if (Number(process.version.split('.')[0]) < 16) {
|
||||
console.log('Invalid NodeJS Version!, Please use NodeJS 16.x or upper')
|
||||
@@ -11,7 +12,9 @@ if (fs.existsSync('./node_modules')) {
|
||||
process.exit()
|
||||
}
|
||||
} else {
|
||||
console.log('There is no node_modules!, please install the package first by using "npm i"')
|
||||
console.log("You are not installing package first, please wait until Auto Installer complete.")
|
||||
child.execSync("npm i")
|
||||
console.log("Auto Installer complete! Please re run this bot!")
|
||||
process.exit()
|
||||
}
|
||||
|
||||
@@ -41,4 +44,4 @@ try {
|
||||
} catch (Err) {
|
||||
console.log('Invalid discord bot token')
|
||||
process.exit()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user