Bug Fixes

This commit is contained in:
dragonfire535
2017-03-14 11:28:55 -04:00
parent b39a2da259
commit b2574c0a33
2 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -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!'));
}
}
+12 -8
View File
@@ -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?');
});
}
}
}