mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Cleaner Looking args
This commit is contained in:
+18
-14
@@ -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)
|
||||
}]
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user