mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-15 00:12:38 +02:00
Tsubaki, Native Image Reading
This commit is contained in:
@@ -44,8 +44,7 @@ module.exports = class CurrencyCommand extends Command {
|
||||
const { base, to, amount } = args;
|
||||
if (base === to) return msg.say(`Converting ${base} to ${to} is the same value, dummy.`);
|
||||
try {
|
||||
const { body } = await request
|
||||
.get(`http://api.fixer.io/latest?base=${base}&symbols=${to}`);
|
||||
const { body } = await request.get(`http://api.fixer.io/latest?base=${base}&symbols=${to}`);
|
||||
const rate = body.rates[to];
|
||||
return msg.say(`${amount} ${base} is ${amount * rate} ${to}.`);
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user