From 0627e2323fc12717ba7567b0af4a88043152c327 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Sat, 10 Jul 2021 17:32:50 +0200 Subject: [PATCH] Fix add custom command where message is empty --- commands/custom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/custom.js b/commands/custom.js index 97ff819..582434c 100644 --- a/commands/custom.js +++ b/commands/custom.js @@ -28,11 +28,11 @@ module.exports = { let customMessage = args.slice(2, args.length).join(" "); switch (args[0].toLowerCase()) { case "add": - if(!args[1]) { + if(!customMessage) { message.channel.send("Message can't be empty"); return; } - sendText = addCustomCommand(args[1], customMessage, message.author.id); + sendText = addCustomCommand(customName, customMessage, message.author.id); break; case "remove": case "delete":