Add check for empty message in custom command

This commit is contained in:
SileNce5k 2021-07-09 20:18:14 +02:00
parent bf1a7985aa
commit b07418e03c
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -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":