Update price.py

Quick error fix
This commit is contained in:
scoobybejesus 2017-08-05 00:08:55 -04:00 committed by GitHub
parent c485cc0a56
commit 9556ad6d66
1 changed files with 2 additions and 2 deletions

View File

@ -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]))