From a3f2804a8c9b207f157b08b35543dccf6730cfb1 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Sat, 10 Jul 2021 20:01:16 +0200 Subject: [PATCH] Fix 'custom show' --- commands/custom.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commands/custom.js b/commands/custom.js index 582434c..c585356 100644 --- a/commands/custom.js +++ b/commands/custom.js @@ -71,11 +71,10 @@ module.exports = { case "show": let json = fs.readFileSync(customPath, 'utf8'); let customCommands = JSON.parse(json) + sendText = "Command not found." customCommands.forEach(function (customCommand) { - if (customCommand.customName === args[1]) { + if (customCommand.customName === customName) { sendText = `\`\`\`\n${customCommand.customMessage}\n\`\`\`` - }else{ - sendText = "Command not found." } }); break;