Fix things (hopefully)

This commit is contained in:
Ecolipsy 2021-12-02 17:13:24 +01:00
parent 83358d5c52
commit a68bde3d02

View file

@ -20,13 +20,12 @@ function parseCommands(){
if(categorydir == "fun") return;
fs.readdirSync("Juustobotti/commands/" + categorydir).forEach(file => {
if(isDir("Juustobotti/commands/" + categorydir + "/" + file)) return;
indexes.file = categorydir;
cmdFiles.push(file);
cmdFiles.push({file: file, dir: categorydir});
});
});
var cmds = [];
cmdFiles.forEach(yes => {
var cmdObj = require("./Juustobotti/commands/" + indexes[yes] + "/yes");
var cmdObj = require("./Juustobotti/commands/" + yes.dir + "/" + yes.file);
cmds.push(cmdObj);
});
return cmds;