mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 14:19:11 +02:00
Better Validators and More Destucturing
This commit is contained in:
@@ -14,10 +14,10 @@ module.exports = class ZalgoCommand extends Command {
|
||||
prompt: 'What text would you like to convert to zalgo?',
|
||||
type: 'string',
|
||||
validate: content => {
|
||||
if (zalgo(content).length > 1950) {
|
||||
return 'Your message content is too long.';
|
||||
if (content.length > 500) {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return `Please keep your text under 500 characters, you have ${content.length}.`;
|
||||
},
|
||||
parse: text => {
|
||||
return zalgo(text);
|
||||
|
||||
Reference in New Issue
Block a user