Move checking if customCommands exists to main cmd

This commit is contained in:
SileNce5k 2021-07-03 19:38:34 +02:00
parent 8211d67326
commit 67f674c92b
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
2 changed files with 4 additions and 3 deletions

View file

@ -13,6 +13,10 @@ module.exports = {
"<prefix>custom list - list all custom commands"
],
execute({message, args, client}) {
const customPath = './data/customCommands.json';
if(!fs.existsSync(customPath)){
fs.writeFileSync(customPath,"[]")
}
let sendText;
if (args){
let customName = args[1];