Allow bot owner to delete custom commands

This commit is contained in:
SileNce5k 2021-07-09 20:22:38 +02:00
parent b07418e03c
commit b872e88f85
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
2 changed files with 7 additions and 7 deletions

View file

@ -17,7 +17,7 @@ module.exports = {
"<prefix>custom list - list all custom commands",
"<prefix>custom variables - list all variables you can use"
],
execute({message, args, client, prefix}) {
execute({message, args, client, prefix, owners}) {
const customPath = './data/customCommands.json';
if(!fs.existsSync(customPath)){
fs.writeFileSync(customPath,"[]")
@ -36,7 +36,7 @@ module.exports = {
break;
case "remove":
case "delete":
sendText = deleteCustomCommand(customName, message.author.id);
sendText = deleteCustomCommand(customName, message.author.id, owners);
break;
case "owner":
let author = getOwnerOfCustomCommand(customName);