From a419e30fb59b59edce499d42854287a8bf3c1291 Mon Sep 17 00:00:00 2001 From: dragonfire535 Date: Fri, 3 Mar 2017 18:47:48 -0500 Subject: [PATCH] Add Character Check in Romaji --- commands/textedit/romaji.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/textedit/romaji.js b/commands/textedit/romaji.js index 9a42c529..6a2e605f 100644 --- a/commands/textedit/romaji.js +++ b/commands/textedit/romaji.js @@ -21,7 +21,11 @@ class RomajiCommand extends commando.Command { let romajify = message.content.split(" ").slice(1).join(" "); if(hepburn.containsKana(romajify)) { let romajified = hepburn.fromKana(romajify); - message.channel.sendMessage(romajified, {split:true}); + if(romajified.length > 1900) { + message.channel.sendMessage(":x: Error! Your message is too long!"); + } else { + message.channel.sendMessage(romajified); + } } else { message.channel.sendMessage(":x: Error! Message contains no Kana!\n:notepad_spiral: Note: You cannot use this command on Kanji!"); }