Actually make bot owner able to delete any command

This commit is contained in:
SileNce5k 2021-07-09 20:28:16 +02:00
parent b872e88f85
commit 7710d53e71
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -7,7 +7,7 @@ module.exports = function(customName, author, owners){
let index = 0;
customCommands.forEach(function (customCommand) {
if (customCommand.customName === customName) {
if(customCommand.author === author || owners.indexOf(author.toString()) != -1 ){
if(customCommand.author === author || owners.indexOf(author) != -1 ){
customCommands.splice(index, 1)
sendText = `The custom command "${customName}" has been deleted.`
fs.writeFileSync(customPath, JSON.stringify(customCommands, null, 4))