diff --git a/commands/avataredit/3000years.js b/commands/avataredit/3000years.js index dc66e1f7..19dc9e1a 100644 --- a/commands/avataredit/3000years.js +++ b/commands/avataredit/3000years.js @@ -26,7 +26,6 @@ module.exports = class YearsCommand extends commando.Command { } console.log(`[Command] ${message.content}`); let user = args.user; - if (!user.displayAvatarURL) return message.channel.send(":x: Error! This user has no avatar!"); let userAvatar = user.displayAvatarURL; userAvatar = userAvatar.replace(".jpg", ".png"); userAvatar = userAvatar.replace(".gif", ".png"); diff --git a/commands/imageedit/meme.js b/commands/imageedit/meme.js index bf8b78e8..76e92b52 100644 --- a/commands/imageedit/meme.js +++ b/commands/imageedit/meme.js @@ -121,13 +121,13 @@ module.exports = class MemeCommand extends commando.Command { } }, { key: 'content', - prompt: 'What should the meme content be?', + prompt: 'What should the meme content be? Split the bottom and top text of the meme with " | ".', type: 'string', validate: content => { if (content.includes(' | ') && content.match(/^[a-zA-Z0-9|.,!?'-\s]+$/)) { return true; } - return 'Please split your choices with ` | ` and do not use special characters.'; + return 'Please split your choices with " | " and do not use special characters.'; } }] }); diff --git a/commands/response/choose.js b/commands/response/choose.js index 0d838ff4..a772e7c0 100644 --- a/commands/response/choose.js +++ b/commands/response/choose.js @@ -19,7 +19,7 @@ module.exports = class ChooseCommand extends commando.Command { if (content.includes(' | ')) { return true; } - return 'Please split your choices with ` | `.'; + return 'Please split your choices with " | ".'; } }] }); diff --git a/commands/textedit/binary.js b/commands/textedit/binary.js index ae707bb6..5b10cf06 100644 --- a/commands/textedit/binary.js +++ b/commands/textedit/binary.js @@ -12,7 +12,13 @@ module.exports = class BinaryCommand extends commando.Command { args: [{ key: 'text', prompt: 'What text would you like to convert to binary?', - type: 'string' + type: 'string', + validate: content => { + if (stringToBinary(content).length > 1950) { + return 'Your message content is too long.'; + } + return true; + } }] }); } @@ -24,7 +30,6 @@ module.exports = class BinaryCommand extends commando.Command { console.log(`[Command] ${message.content}`); let turnToBinary = args.text; let binaryText = stringToBinary(turnToBinary); - if (binaryText.length > 1950) return message.channel.send(":x: Error! Your message is too long!"); return message.channel.send(binaryText); } }; diff --git a/commands/textedit/morse.js b/commands/textedit/morse.js index a97ac254..ed55b0f3 100644 --- a/commands/textedit/morse.js +++ b/commands/textedit/morse.js @@ -24,7 +24,7 @@ module.exports = class MorseCommand extends commando.Command { } }, { key: 'text', - prompt: 'What text would you like to convert to morse?', + prompt: 'What text would you like to convert to/from morse?', type: 'string' }] }); diff --git a/commands/textedit/pirate.js b/commands/textedit/pirate.js index 803df3ca..6b91b1cf 100644 --- a/commands/textedit/pirate.js +++ b/commands/textedit/pirate.js @@ -16,7 +16,13 @@ module.exports = class PirateCommand extends commando.Command { args: [{ key: 'text', prompt: 'What text would you like to convert to pirate?', - type: 'string' + type: 'string', + validate: content => { + if (pirateSpeak.translate(content).length > 1950) { + return 'Your message content is too long.'; + } + return true; + } }] }); } diff --git a/commands/textedit/romaji.js b/commands/textedit/romaji.js index 8d25b924..cdddf05e 100644 --- a/commands/textedit/romaji.js +++ b/commands/textedit/romaji.js @@ -18,6 +18,9 @@ module.exports = class RomajiCommand extends commando.Command { type: 'string', validate: kana => { if (hepburn.containsKana(kana)) { + if (hepburn.fromKana(kana).length > 1950) { + return 'Your message content is too long.'; + } return true; } return 'Please enter text in either Hiragana or Katakana.'; @@ -33,7 +36,6 @@ module.exports = class RomajiCommand extends commando.Command { console.log(`[Command] ${message.content}`); let romajify = args.kana; let romajified = hepburn.fromKana(romajify); - if (romajified.length > 1950) return message.channel.send(":x: Error! Your message is too long!"); return message.channel.send(romajified); } }; diff --git a/commands/textedit/temmie.js b/commands/textedit/temmie.js index 950816dc..c748169f 100644 --- a/commands/textedit/temmie.js +++ b/commands/textedit/temmie.js @@ -297,7 +297,13 @@ module.exports = class TemmieCommand extends commando.Command { args: [{ key: 'text', prompt: 'What text would you like to convert to Temmie speak?', - type: 'string' + type: 'string', + validate: content => { + if (temmize(content).length > 1950) { + return 'Your message content is too long.'; + } + return true; + } }] }); } diff --git a/commands/textedit/zalgo.js b/commands/textedit/zalgo.js index 0ed313f4..7e594817 100644 --- a/commands/textedit/zalgo.js +++ b/commands/textedit/zalgo.js @@ -12,7 +12,13 @@ module.exports = class ZalgoCommand extends commando.Command { args: [{ key: 'text', prompt: 'What text would you like to convert to zalgo?', - type: 'string' + type: 'string', + validate: content => { + if (zalgo(content).length > 1950) { + return 'Your message content is too long.'; + } + return true; + } }] }); } @@ -23,7 +29,6 @@ module.exports = class ZalgoCommand extends commando.Command { } console.log(`[Command] ${message.content}`); let zalgoified = zalgo(args.text); - if (zalgoified.length > 1950) return message.channel.send(":x: Error! Your message is too long!"); return message.channel.send(zalgoified); } };