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(" ");
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":