fix 'top' bug

This commit is contained in:
scoobybejesus
2018-01-02 22:25:54 -05:00
committed by GitHub
parent 77ddc51d7c
commit 624c3b498a
+2 -2
View File
@@ -367,7 +367,7 @@ def top(bot, trigger):
mylist = range(1,limit + 1)
if limit > 10:
bot.say("Too high! Max is 10!")
else if limit < 1:
elif limit < 1:
bot.say("Dude...")
else:
try:
@@ -389,7 +389,7 @@ def top(bot, trigger):
price_btc = float(coin['price_btc'])
market_cap_usd = float(coin['market_cap_usd'])
if market_cap_usd >= 1000000000:
market_cap_short = int(round(market_cap_usd,-9)/1000000000
market_cap_short = int(int(round(market_cap_usd,-9))/int(1000000000))
rounded_mcap = str(market_cap_short)+"B"
else:
rounded_mcap = "tiny"