mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Add Character Check in Romaji
This commit is contained in:
@@ -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!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user