diff --git a/helpers/autoUpdateDocs.js b/helpers/autoUpdateDocs.js index 18fcfe9018..35b017afd6 100644 --- a/helpers/autoUpdateDocs.js +++ b/helpers/autoUpdateDocs.js @@ -48,8 +48,10 @@ module.exports = { text += `${table(arrCat)}\n\n`; }); const fs = require("fs"); - fs.writeFileSync("./docs/commands.md", text); - client.logger.log("Docs updated!"); + if(fs.existsSync("./docs")){ + fs.writeFileSync("./docs/commands.md", text); + client.logger.log("Docs updated!"); + } } }; \ No newline at end of file