Fix things (hopefully)
This commit is contained in:
parent
83358d5c52
commit
a68bde3d02
1 changed files with 2 additions and 3 deletions
5
index.js
5
index.js
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue