Cleaner Looking args

This commit is contained in:
Daniel Odendahl Jr
2017-05-02 17:54:07 +00:00
parent 57ee7fa82b
commit 3bb21c2df0
83 changed files with 787 additions and 616 deletions
+18 -14
View File
@@ -8,21 +8,25 @@ module.exports = class MapCommand extends Command {
group: 'search',
memberName: 'map',
description: 'Gets a map image for the location you define with the zoom level you define (1-20).',
args: [{
key: 'zoom',
prompt: 'What would you like the zoom level for the map to be? Limit 1-20.',
type: 'integer',
validate: zoom => {
if (zoom < 21 && zoom > 0)
return true;
return 'Please enter a zoom value from 1-20';
args: [
{
key: 'zoom',
label: 'zoom level',
prompt: 'What would you like the zoom level for the map to be? Limit 1-20.',
type: 'integer',
validate: zoom => {
if (zoom < 21 && zoom > 0)
return true;
return 'Please enter a zoom value from 1-20';
}
},
{
key: 'query',
prompt: 'What location you like to get a map image for?',
type: 'string',
parse: query => encodeURIComponent(query)
}
}, {
key: 'query',
prompt: 'What location you like to get a map image for?',
type: 'string',
parse: query => encodeURIComponent(query)
}]
]
});
}