From 7710d53e714a3bc09c939f45f931d91710f89def Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Fri, 9 Jul 2021 20:28:16 +0200 Subject: [PATCH] Actually make bot owner able to delete any command --- util/deleteCustomCommand.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/deleteCustomCommand.js b/util/deleteCustomCommand.js index f646391..e74a432 100644 --- a/util/deleteCustomCommand.js +++ b/util/deleteCustomCommand.js @@ -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))