mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Random Fixes
This commit is contained in:
@@ -18,11 +18,6 @@ module.exports = class BinaryCommand extends commando.Command {
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let turnToBinary = message.content.split(" ").slice(1).join(" ");
|
||||
try {
|
||||
message.channel.send(stringToBinary(turnToBinary));
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(':x: Error! Translation is too long, or nothing was entered!');
|
||||
}
|
||||
message.channel.send(stringToBinary(turnToBinary)).catch(error => message.channel.send(':x: Error! Translation is too long, or nothing was entered!'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -22,16 +22,11 @@ module.exports = class CowsayCommand extends commando.Command {
|
||||
}
|
||||
else {
|
||||
let turnToCowsay = message.content.split(" ").slice(1).join(" ");
|
||||
try {
|
||||
message.channel.sendCode(null, cowsay.say({
|
||||
text: turnToCowsay,
|
||||
e: "oO",
|
||||
T: "U "
|
||||
}));
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(':x: Error! Perhaps the content is too long?');
|
||||
}
|
||||
message.channel.sendCode(null, cowsay.say({
|
||||
text: turnToCowsay,
|
||||
e: "oO",
|
||||
T: "U "
|
||||
})).catch(error => message.channel.send(':x: Error! Perhaps the content is too long?'));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -26,20 +26,10 @@ module.exports = class MorseCommand extends commando.Command {
|
||||
message.channel.send(":x: Error! Nothing to translate! Perhaps you forgot to set the method? Use either encode or decode before your text.");
|
||||
}
|
||||
else if (methodToUse === 'encode') {
|
||||
try {
|
||||
message.channel.send(morse.encode(toMorse));
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(':x: Error! Something went wrong! Perhaps you entered incorrect text?');
|
||||
}
|
||||
message.channel.send(morse.encode(toMorse)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered incorrect text?'));
|
||||
}
|
||||
else if (methodToUse === 'decode') {
|
||||
try {
|
||||
message.channel.send(morse.decode(toMorse));
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(':x: Error! Something went wrong! Perhaps you entered incorrect text?');
|
||||
}
|
||||
message.channel.send(morse.decode(toMorse)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered incorrect text?'));
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! Method not set/not correct! Use either encode or decode.");
|
||||
|
||||
Reference in New Issue
Block a user