diff --git a/package.json b/package.json index 480a018..e7eda9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "screeps-performance-server", - "version": "1.11.3", + "version": "1.12.0", "dependencies": { "@octokit/core": "^4.2.0", "discord.js": "^14.9.0", diff --git a/src/setup.js b/src/setup.js index 906f8c7..56e7614 100644 --- a/src/setup.js +++ b/src/setup.js @@ -45,18 +45,19 @@ function UpdateBotFolder() { } const filesInNewBotFolder = fs.readdirSync(newBotFolder); - const botFiles = filesInNewBotFolder.filter((file) => file.endsWith(".js")); - if (botFiles.length === 0) { + if (filesInNewBotFolder.length === 0) { console.log("No bot files found in the provided folder"); throw new Error("No bot files found"); } - botFiles.forEach((fileName) => { + filesInNewBotFolder.forEach((fileName) => { const file = fs.readFileSync(join(newBotFolder, fileName), "utf8"); fs.writeFileSync(join(botFolder, fileName), file); }); - console.log(`Replaced bot folder with an total of ${botFiles.length} files`); + console.log( + `Replaced bot folder with an total of ${filesInNewBotFolder.length} files` + ); } // eslint-disable-next-line consistent-return