From 7e9c2f911753de43ca0e9dad2f691a5ae6b736d4 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 28 Jul 2018 20:14:37 +0000 Subject: [PATCH] Fix ogre 2 --- price.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/price.py b/price.py index e9dc42c..a6da320 100644 --- a/price.py +++ b/price.py @@ -285,17 +285,17 @@ def trex(bot, trigger): @sopel.module.commands('tradeogre', 'ogre') def ogre(bot, trigger): if not trigger.group(2): - pair = 'BTC-XMR' + pair = 'BTC-XMR' else: - coin = 'BTC-'+trigger.group(2).upper() + pair = 'BTC-'+trigger.group(2).upper() try: r = requests.get(ogreurl) j = r.json() for i in j: - if pair == i.keys(): + if pair == i.keys()[0]: last=float(i[pair]['price']) vol=float(i[pair]['volume']) - bot.say("Tradeogre at {0:.8f} BTC; on {1:.3f} BTC volume".format(last, vol)) + bot.say("{0} on Tradeogre at {1:.8f} BTC on {2:.3f} BTC volume".format(pair, last, vol)) except: bot.say("Error retrieving data from Ogre")