mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 10:25:11 +02:00
This is fine
This commit is contained in:
@@ -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('You cannot convert to the same currency as your base.');
|
if(base === to) return msg.say(`${amount} ${base} is ${amount} ${base}.`);
|
||||||
try {
|
try {
|
||||||
const { body } = await request
|
const { body } = await request
|
||||||
.get(`http://api.fixer.io/latest?base=${base}`);
|
.get(`http://api.fixer.io/latest?base=${base}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user