parent
c485cc0a56
commit
9556ad6d66
4
price.py
4
price.py
|
@ -96,8 +96,8 @@ def krak(bot, trigger):
|
||||||
else:
|
else:
|
||||||
coin = trigger.group(2).upper()
|
coin = trigger.group(2).upper()
|
||||||
try:
|
try:
|
||||||
kraktrig = kraktrig[-1] #Didn't test. It's meant to delete the "'". Delete this line if unneeded.
|
kraktrig = kraktrig[:-1] #Didn't test. It's meant to delete the "'" from end of string. Delete this line if unneeded.
|
||||||
kraktrig = kraktrig.append(coin)+"'" #Again, delete the "+" and after if unneeded.
|
kraktrig = kraktrig.append(coin)+"'" #Again, delete the +"'" at the end, if unneeded.
|
||||||
r=requests.get(kraktrig)
|
r=requests.get(kraktrig)
|
||||||
j=r.json()
|
j=r.json()
|
||||||
stringtosay += coin + " at {0:.2f} on {1:.2f} 24 h BTC volume. ".format(float(j['result']['X'+str(coin)+'XXBT']['c'][0]), float(j['result']['X'+str(coin)+'XXBT']['v'][1]))
|
stringtosay += coin + " at {0:.2f} on {1:.2f} 24 h BTC volume. ".format(float(j['result']['X'+str(coin)+'XXBT']['c'][0]), float(j['result']['X'+str(coin)+'XXBT']['v'][1]))
|
||||||
|
|
Loading…
Reference in New Issue