mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-06 22:44:32 +02:00
Better Error Handling
This commit is contained in:
@@ -20,9 +20,8 @@ module.exports = class BinaryCommand extends Command {
|
||||
prompt: 'What text would you like to convert to binary?',
|
||||
type: 'string',
|
||||
validate: text => {
|
||||
if(binary(text).length < 2000)
|
||||
return true;
|
||||
return 'Your message content is too long.';
|
||||
if(binary(text).length < 2000) return true;
|
||||
return 'Your text is too long.';
|
||||
},
|
||||
parse: text => binary(text)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user