This commit is contained in:
Daniel Odendahl Jr
2017-05-05 14:11:30 +00:00
parent c607610016
commit b9925444ad
+1 -1
View File
@@ -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) {