mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 13:53:12 +02:00
Mneh
This commit is contained in:
@@ -48,7 +48,7 @@ module.exports = class CurrencyCommand extends Command {
|
||||
try {
|
||||
const { body } = await request
|
||||
.get(`http://api.fixer.io/latest?base=${base}`);
|
||||
const rate = body[to];
|
||||
const rate = body.rates[to];
|
||||
const converted = rate * amount;
|
||||
return msg.say(`${amount} ${base} is ${converted} ${to}.`);
|
||||
} catch(err) {
|
||||
|
||||
Reference in New Issue
Block a user