From b07418e03c8aa1053133c3f5d89beabbbd2c14c5 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Fri, 9 Jul 2021 20:18:14 +0200 Subject: [PATCH] Add check for empty message in custom command --- commands/custom.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/custom.js b/commands/custom.js index a56e496..0d55eae 100644 --- a/commands/custom.js +++ b/commands/custom.js @@ -28,6 +28,10 @@ module.exports = { let customMessage = args.slice(2, args.length).join(" "); switch (args[0].toLowerCase()) { case "add": + if(!args[1]) { + message.channel.send("Message can't be empty"); + return; + } sendText = addCustomCommand(args[1], customMessage, message.author.id); break; case "remove":