ripple in peace die zweite
This commit is contained in:
parent
b05cbccf1e
commit
e4e89c3891
@ -21,7 +21,11 @@ export default bot => {
|
||||
bot._trigger.set("coins", new bot.trigger({
|
||||
call: /^(\.|\/)(btc|eth|xmr|xrp)/i,
|
||||
f: e => {
|
||||
cryptowat_summary(e.cmd, markets[e.cmd], e.cmd !== "xmr" || e.cmd !== "xrp" ? e.args[0] || "eur" : "usdt").then(
|
||||
let currency = e.args[0] || "eur";
|
||||
if(e.cmd === "xrp")
|
||||
currency = "usdt";
|
||||
|
||||
cryptowat_summary(e.cmd, markets[e.cmd], currency).then(
|
||||
resolve => e.reply(resolve),
|
||||
reject => e.reply(reject)
|
||||
);
|
||||
@ -35,6 +39,7 @@ const cryptowat_summary = (crypto, market, currency) => {
|
||||
reject(`Can't convert or invalid currency: ${currency}`);
|
||||
rp([{ market: market, crypto: crypto, currency: currency }].map(api_url).join``, { json: true })
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.length === 0)
|
||||
reject("No data received");
|
||||
const data = {
|
||||
|
Loading…
Reference in New Issue
Block a user