diff --git a/commands/textedit/binary.js b/commands/textedit/binary.js index 86af8d43..5ffae881 100644 --- a/commands/textedit/binary.js +++ b/commands/textedit/binary.js @@ -19,7 +19,7 @@ class BinaryCommand extends commando.Command { } console.log("[Command] " + message.content); let turnToBinary = message.content.split(" ").slice(1).join(" "); - message.channel.sendMessage(stringToBinary(turnToBinary)).catch(error => message.channel.sendMessage(':x: Error! Translation is too long!')); + message.channel.sendMessage(stringToBinary(turnToBinary)).catch(error => message.channel.sendMessage(':x: Error! Translation is too long, or nothing was entered!')); } } diff --git a/commands/textedit/cowsay.js b/commands/textedit/cowsay.js index ed45123b..48f42fb1 100644 --- a/commands/textedit/cowsay.js +++ b/commands/textedit/cowsay.js @@ -18,14 +18,18 @@ class CowsayCommand extends commando.Command { if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return; } console.log("[Command] " + message.content); - let turnToCowsay = message.content.split(" ").slice(1).join(" "); - message.channel.sendCode(null, cowsay.say({ - text : turnToCowsay, - e : "oO", - T : "U " - })).catch(error => { - message.channel.sendMessage(':x: Error! Perhaps you entered nothing? Or perhaps the content is too long?'); - }); + if(message.content.split(" ").slice(1).join(" ") === "") { + message.channel.sendMessage(":x: Error! You entered nothing!"); + } else { + let turnToCowsay = message.content.split(" ").slice(1).join(" "); + message.channel.sendCode(null, cowsay.say({ + text : turnToCowsay, + e : "oO", + T : "U " + })).catch(error => { + message.channel.sendMessage(':x: Error! Perhaps the content is too long?'); + }); + } } }