mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +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'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "69.5.0",
|
||||
"version": "70.0.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user