Fix some stuff

This commit is contained in:
Ecolipsy 2021-12-02 18:26:03 +01:00
parent 549ab4e19d
commit 16d78b39d1
2 changed files with 4 additions and 1 deletions

View file

@ -11,6 +11,8 @@ function isDir(path){
} }
} }
client.commands = new dc.Collection();
function parseCommands(){ function parseCommands(){
var cmdFiles = []; var cmdFiles = [];
var indexes = {} var indexes = {}
@ -25,10 +27,12 @@ function parseCommands(){
}); });
}); });
var cmds = []; var cmds = [];
client.commands = new dc.Collection();
cmdFiles.forEach(yes => { cmdFiles.forEach(yes => {
var cmdObj = require("./Juustobotti/commands/" + yes.dir + "/" + yes.file); var cmdObj = require("./Juustobotti/commands/" + yes.dir + "/" + yes.file);
cmds.push(cmdObj); cmds.push(cmdObj);
}); });
client.commands.set(cmds);
return cmds; return cmds;
} }

View file

@ -2,7 +2,6 @@ while [ true ]
do do
rm -rf Juustobotti rm -rf Juustobotti
git clone https://github.com/Pizzakeitto/Juustobotti.git git clone https://github.com/Pizzakeitto/Juustobotti.git
rm Juustobotti/.git
echo '{"prefix": "ju!"}' > Juustobotti/config.json echo '{"prefix": "ju!"}' > Juustobotti/config.json
git pull git pull
node . node .