mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 13:56:25 +02:00
Better Validators and More Destucturing
This commit is contained in:
@@ -19,10 +19,10 @@ module.exports = class WarnCommand extends Command {
|
||||
prompt: 'What do you want to set the reason as?',
|
||||
type: 'string',
|
||||
validate: reason => {
|
||||
if (reason.length < 141) {
|
||||
if (reason.length < 140) {
|
||||
return true;
|
||||
}
|
||||
return 'Please keep your reason under 140 characters.';
|
||||
return `Please keep your reason under 140 characters, you have ${reason.length}.`;
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user