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;
|
if(categorydir == "fun") return;
|
||||||
fs.readdirSync("Juustobotti/commands/" + categorydir).forEach(file => {
|
fs.readdirSync("Juustobotti/commands/" + categorydir).forEach(file => {
|
||||||
if(isDir("Juustobotti/commands/" + categorydir + "/" + file)) return;
|
if(isDir("Juustobotti/commands/" + categorydir + "/" + file)) return;
|
||||||
indexes.file = categorydir;
|
cmdFiles.push({file: file, dir: categorydir});
|
||||||
cmdFiles.push(file);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
var cmds = [];
|
var cmds = [];
|
||||||
cmdFiles.forEach(yes => {
|
cmdFiles.forEach(yes => {
|
||||||
var cmdObj = require("./Juustobotti/commands/" + indexes[yes] + "/yes");
|
var cmdObj = require("./Juustobotti/commands/" + yes.dir + "/" + yes.file);
|
||||||
cmds.push(cmdObj);
|
cmds.push(cmdObj);
|
||||||
});
|
});
|
||||||
return cmds;
|
return cmds;
|
||||||
|
|
Loading…
Reference in a new issue