mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Bug Fixes
This commit is contained in:
@@ -16,9 +16,10 @@ module.exports = class EmojifyCommand extends Command {
|
||||
prompt: 'What text would you like to convert to emoji?',
|
||||
type: 'string',
|
||||
validate: text => {
|
||||
if (letterTrans(text, dictionary).length < 2000) return true;
|
||||
if (letterTrans(text.toLowerCase(), dictionary).length < 2000) return true;
|
||||
return 'Your text is too long.';
|
||||
}
|
||||
},
|
||||
parse: text => text.toLowerCase()
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -26,6 +27,6 @@ module.exports = class EmojifyCommand extends Command {
|
||||
|
||||
run(msg, args) {
|
||||
const { text } = args;
|
||||
return msg.say(letterTrans(text.toLowerCase(), dictionary));
|
||||
return msg.say(letterTrans(text, dictionary));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,9 +15,10 @@ module.exports = class MorseCommand extends Command {
|
||||
prompt: 'What text would you like to convert to morse?',
|
||||
type: 'string',
|
||||
validate: text => {
|
||||
if (letterTrans(text, dictionary, ' ').length < 2000) return true;
|
||||
if (letterTrans(text.toLowerCase(), dictionary, ' ').length < 2000) return true;
|
||||
return 'Your text is too long.';
|
||||
}
|
||||
},
|
||||
parse: text => text.toLowerCase()
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -25,6 +26,6 @@ module.exports = class MorseCommand extends Command {
|
||||
|
||||
run(msg, args) {
|
||||
const { text } = args;
|
||||
return msg.say(letterTrans(text.toLowerCase(), dictionary, ' '));
|
||||
return msg.say(letterTrans(text, dictionary, ' '));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user