mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Better Validators and More Destucturing
This commit is contained in:
@@ -15,10 +15,10 @@ module.exports = class TemmieCommand extends Command {
|
||||
prompt: 'What text would you like to convert to Temmie speak?',
|
||||
type: 'string',
|
||||
validate: content => {
|
||||
if (translator.wordTrans(content, dictionary).length > 1950) {
|
||||
return 'Your message content is too long.';
|
||||
if (translator.wordTrans(content, dictionary).length < 1999) {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return 'Your message content is too long.';
|
||||
},
|
||||
parse: text => {
|
||||
return translator.wordTrans(text, dictionary);
|
||||
|
||||
Reference in New Issue
Block a user