Compare commits

..

No commits in common. "245c49a16581dd2dc2aaa273666a54c0522f95a5" and "65c7245116dd99166baa01a960e035bfe7c94982" have entirely different histories.

1 changed files with 12 additions and 18 deletions

View File

@ -397,16 +397,10 @@ def ogre(bot, trigger):
@sopel.module.commands('trex', 'bittrex')
def trex(bot, trigger):
geturl = ""
if not trigger.group(2):
bot.say("spineless...")
break
geturl = trexurl+'xmr'
else:
if trigger.group(2) == "xmr":
bot.say("spineless")
break
else:
geturl = trexurl + trigger.group(2)
geturl = trexurl + trigger.group(2)
try:
r = requests.get(geturl)
j = r.json()
@ -670,17 +664,17 @@ def xmrtall(bot, trigger):
bot.say("Borka borka ┌∩┐(◣_◢)┌∩┐")
# Trex
# geturl = trexurl+'xmr'
# try:
# r = requests.get(geturl)
# j = r.json()
# xmr=j['result'][0]
# last=float(xmr['Last'])
geturl = trexurl+'xmr'
try:
r = requests.get(geturl)
j = r.json()
xmr=j['result'][0]
last=float(xmr['Last'])
# change=((last/float(xmr['PrevDay']))-1)
# vol=float(xmr['BaseVolume'])
# stringtosend += "Bittrex last: {0:.6f} BTC on {1:.2f} BTC volume | ".format(last, vol)
# except:
# bot.say("Something borked -_-")
vol=float(xmr['BaseVolume'])
stringtosend += "Bittrex last: {0:.6f} BTC on {1:.2f} BTC volume | ".format(last, vol)
except:
bot.say("Something borked -_-")
#Finally... print to IRC
bot.say(stringtosend[:-2])