mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 03:14:35 +02:00
Bug Fixes
This commit is contained in:
@@ -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!'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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?');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user