diff --git a/commands/numedit/roman.js b/commands/numedit/roman.js index 931b3a98..50b383a1 100644 --- a/commands/numedit/roman.js +++ b/commands/numedit/roman.js @@ -23,12 +23,7 @@ module.exports = class RomanCommand extends commando.Command { message.channel.send(':x: Error! Number is too high!'); } else { - try { - message.channel.send(romanNumeralConverter.getRomanFromInteger(romanInterger)); - } - catch (err) { - message.channel.send(':x: Error! Something went wrong! Perhaps you entered nothing?'); - } + message.channel.send(romanNumeralConverter.getRomanFromInteger(romanInterger)).catch(error => message.channel.send(':x: Error! Translation is too long, or nothing was entered!')); } } }; diff --git a/commands/response/coin.js b/commands/response/coin.js index 29255a44..76844e90 100644 --- a/commands/response/coin.js +++ b/commands/response/coin.js @@ -20,8 +20,8 @@ module.exports = class CoinFlipCommand extends commando.Command { if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return; } console.log(`[Command] ${message.content}`); - let coin = ['Heads', 'Tails']; + let coin = ['heads', 'tails']; coin = coin[Math.floor(Math.random() * coin.length)]; - message.channel.send(`It landed on ${coin}`); + message.channel.send(`It landed on ${coin}!`); } }; diff --git a/commands/response/quantumcoin.js b/commands/response/quantumcoin.js index 4cb82f46..0e0294dc 100644 --- a/commands/response/quantumcoin.js +++ b/commands/response/quantumcoin.js @@ -23,6 +23,6 @@ module.exports = class QuantumCoin extends commando.Command { console.log(`[Command] ${message.content}`); let qcoin = ['on nothing', 'on NaN', 'on 0', 'in the air', 'on null']; qcoin = qcoin[Math.floor(Math.random() * qcoin.length)]; - message.channel.send(`It landed ${qcoin}`); + message.channel.send(`It landed ${qcoin}.`); } }; diff --git a/commands/response/roll.js b/commands/response/roll.js index 7a7b4144..efd6a1b9 100644 --- a/commands/response/roll.js +++ b/commands/response/roll.js @@ -23,11 +23,11 @@ module.exports = class RollChooseCommand extends commando.Command { let [value] = message.content.split(" ").slice(1); if (!value) { let roll = Math.floor(Math.random() * 6) + 1; - message.channel.send(`You rolled a ${roll}`); + message.channel.send(`You rolled a ${roll}.`); } else if (value.match(/^[0-9]+$/)) { let roll = Math.floor(Math.random() * value) + 1; - message.channel.send(`You rolled a ${roll}`); + message.channel.send(`You rolled a ${roll}.`); } else { message.channel.send(":x: Error! Your message either contains a number but the number is invalid, or the number is in the wrong place.\n:notepad_spiral: (Note: When using numbers such as 1,000, do not use a comma)"); diff --git a/commands/textedit/binary.js b/commands/textedit/binary.js index a209736e..ce326b7c 100644 --- a/commands/textedit/binary.js +++ b/commands/textedit/binary.js @@ -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!')); } }; diff --git a/commands/textedit/cowsay.js b/commands/textedit/cowsay.js index f12e4ad5..8c916895 100644 --- a/commands/textedit/cowsay.js +++ b/commands/textedit/cowsay.js @@ -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?')); } } }; diff --git a/commands/textedit/morse.js b/commands/textedit/morse.js index 01316925..ffaee71e 100644 --- a/commands/textedit/morse.js +++ b/commands/textedit/morse.js @@ -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.");