Fix add custom command where message is empty

This commit is contained in:
SileNce5k 2021-07-10 17:32:50 +02:00
parent 2820cf954b
commit 0627e2323f
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -28,11 +28,11 @@ module.exports = {
let customMessage = args.slice(2, args.length).join(" "); let customMessage = args.slice(2, args.length).join(" ");
switch (args[0].toLowerCase()) { switch (args[0].toLowerCase()) {
case "add": case "add":
if(!args[1]) { if(!customMessage) {
message.channel.send("Message can't be empty"); message.channel.send("Message can't be empty");
return; return;
} }
sendText = addCustomCommand(args[1], customMessage, message.author.id); sendText = addCustomCommand(customName, customMessage, message.author.id);
break; break;
case "remove": case "remove":
case "delete": case "delete":