mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 00:09:08 +02:00
Var name change
This commit is contained in:
@@ -31,7 +31,7 @@ module.exports = class CurrencyCommand extends Command {
|
|||||||
return true;
|
return true;
|
||||||
return `${to} is not a valid currency code. Use \`help currency\` to view a list of codes.`;
|
return `${to} is not a valid currency code. Use \`help currency\` to view a list of codes.`;
|
||||||
},
|
},
|
||||||
parse: code => code.toUpperCase()
|
parse: to => to.toUpperCase()
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'amount',
|
key: 'amount',
|
||||||
@@ -44,7 +44,7 @@ module.exports = class CurrencyCommand extends Command {
|
|||||||
|
|
||||||
async run(msg, args) {
|
async run(msg, args) {
|
||||||
const { base, to, amount } = args;
|
const { base, to, amount } = args;
|
||||||
if(base === to) return msg.say(`${amount} ${base} is ${amount} ${base}.`);
|
if(base === to) return msg.say(`${amount} ${base} is ${amount} ${to}.`);
|
||||||
try {
|
try {
|
||||||
const { body } = await request
|
const { body } = await request
|
||||||
.get(`http://api.fixer.io/latest?base=${base}&symbols=${to}`);
|
.get(`http://api.fixer.io/latest?base=${base}&symbols=${to}`);
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "18.2.0",
|
"version": "18.2.1",
|
||||||
"description": "A Discord Bot",
|
"description": "A Discord Bot",
|
||||||
"main": "shardingmanager.js",
|
"main": "shardingmanager.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user