mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Change order of currency and units arguments
This commit is contained in:
@@ -13,6 +13,11 @@ module.exports = class CurrencyCommand extends Command {
|
||||
description: 'Converts money from one currency to another.',
|
||||
details: `**Codes**: ${codes.join(', ')}`,
|
||||
args: [
|
||||
{
|
||||
key: 'amount',
|
||||
prompt: 'How much money should be converted? Do not use symbols.',
|
||||
type: 'float'
|
||||
},
|
||||
{
|
||||
key: 'base',
|
||||
prompt: `What currency code do you want to use as the base? Either ${list(codes, 'or')}.`,
|
||||
@@ -32,11 +37,6 @@ module.exports = class CurrencyCommand extends Command {
|
||||
return `Invalid target, please enter either ${list(codes, 'or')}.`;
|
||||
},
|
||||
parse: target => target.toUpperCase()
|
||||
},
|
||||
{
|
||||
key: 'amount',
|
||||
prompt: 'How much money should be converted? Do not use symbols.',
|
||||
type: 'float'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -10,6 +10,11 @@ module.exports = class UnitsCommand extends Command {
|
||||
memberName: 'units',
|
||||
description: 'Converts units to/from other units.',
|
||||
args: [
|
||||
{
|
||||
key: 'amount',
|
||||
prompt: 'How many units should be converted?',
|
||||
type: 'float'
|
||||
},
|
||||
{
|
||||
key: 'base',
|
||||
prompt: 'What unit type do you want to convert from?',
|
||||
@@ -21,11 +26,6 @@ module.exports = class UnitsCommand extends Command {
|
||||
prompt: 'What unit type do you want to convert to?',
|
||||
type: 'string',
|
||||
parse: target => target.toLowerCase()
|
||||
},
|
||||
{
|
||||
key: 'amount',
|
||||
prompt: 'How many units should be converted?',
|
||||
type: 'float'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user