From 88dd52cf4621ae4d95833713d11d200dee1979d5 Mon Sep 17 00:00:00 2001 From: Scoooolzs <84376629+Scoooolzs@users.noreply.github.com> Date: Sun, 29 May 2022 20:30:51 +0700 Subject: [PATCH 1/3] Update index.js --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 122ea6e..1e56344 100644 --- a/index.js +++ b/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() -} \ No newline at end of file +} From 4a267ff22cefff9b4056b33c8bd24cddc4338b6c Mon Sep 17 00:00:00 2001 From: Scoooolzs <84376629+Scoooolzs@users.noreply.github.com> Date: Sun, 29 May 2022 20:32:36 +0700 Subject: [PATCH 2/3] Update index.js --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 1e56344..043a589 100644 --- a/index.js +++ b/index.js @@ -13,7 +13,10 @@ if (fs.existsSync('./node_modules')) { } } else { console.log("You are not installing package first, please wait until Auto Installer complete.") - child.execSync("npm i") + child.execSync("npm i").catch((err) => { + console.log("An error detected: ", err) + console.log("If you want") + }) console.log("Auto Installer complete! Please re run this bot!") process.exit() } From 81f81a6609aeb1288bda090f452260bcbc77a8b3 Mon Sep 17 00:00:00 2001 From: Scoooolzs <84376629+Scoooolzs@users.noreply.github.com> Date: Sun, 29 May 2022 20:37:15 +0700 Subject: [PATCH 3/3] Update index.js --- index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 043a589..599a3dc 100644 --- a/index.js +++ b/index.js @@ -12,10 +12,11 @@ if (fs.existsSync('./node_modules')) { process.exit() } } else { - console.log("You are not installing package first, please wait until Auto Installer complete.") - child.execSync("npm i").catch((err) => { - console.log("An error detected: ", err) - console.log("If you want") + console.log('You are not installing package first, please wait until Auto Installer complete.') + child.execSync('npm i').catch((err) => { + console.log('An error detected: ', err) + console.log('Need Support? https://discord.gg/zv6maQRah3') + process.exit() }) console.log("Auto Installer complete! Please re run this bot!") process.exit()