Compare commits
No commits in common. "92367eaf8e77aae4ed10a2f2e1e83238844e10e7" and "872e960dacd0c5383b79ca8ad8e24bd3c5ff1b24" have entirely different histories.
92367eaf8e
...
872e960dac
15
price.py
15
price.py
|
@ -432,21 +432,12 @@ def top(bot, trigger):
|
||||||
except:
|
except:
|
||||||
bot.say("Can't connect to coingecko API")
|
bot.say("Can't connect to coingecko API")
|
||||||
if not trigger.group(2):
|
if not trigger.group(2):
|
||||||
try:
|
|
||||||
r = requests.get('https://api.coingecko.com/api/v3/coins/'+'monero')
|
|
||||||
j = r.json()
|
|
||||||
mcaprank = j['market_cap_rank']
|
|
||||||
if mcaprank > 20:
|
|
||||||
limit = mcaprank
|
|
||||||
else:
|
|
||||||
limit = 20
|
|
||||||
except:
|
|
||||||
limit = 20
|
limit = 20
|
||||||
else:
|
else:
|
||||||
limit = int(trigger.group(2))
|
limit = int(trigger.group(2))
|
||||||
if limit > 30:
|
if limit > 20:
|
||||||
bot.say("Too high! Max is 30!")
|
bot.say("Too high! Max is 20!")
|
||||||
limit = 30
|
limit = 20
|
||||||
elif limit < 1:
|
elif limit < 1:
|
||||||
bot.say("Dude...")
|
bot.say("Dude...")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue