Pterodactyl panel support part 2

This commit is contained in:
DJj123dj
2024-08-22 16:09:29 +02:00
parent 7dd9bf1ac0
commit 5512bc1134
2 changed files with 13 additions and 2 deletions
+11
View File
@@ -0,0 +1,11 @@
//PLEASE COMPILE USING "npm run build" BEFORE STARTING THE BOT!
//OR USE "npm start" TO INSTANTLY COMPILE & START THE BOT!
const fs = require("fs")
const child = require("child_process")
if (!fs.existsSync("./dist/src/index.js")){
console.log("Compiling the bot...")
child.execSync("npm run build",{timeout:10000})
console.log("\n\nFinished compilation!")
}
require("./dist/src/index")
+2 -2
View File
@@ -10,10 +10,10 @@
"plugins",
"discord-ticket-bot"
],
"main": "./src/index.ts",
"main": "index.js",
"scripts": {
"build": "rm -rf ./dist/ && npx tsc -p ./tsconfig.json",
"start": "npm run build && node ./dist/src/index.js",
"start": "npm run build && node index.js",
"test": "npm run start -- --dev-config --dev-database"
},
"type": "commonjs",