This commit is contained in:
root 2018-01-03 15:36:00 +00:00
parent 332d4351e1
commit b134ca3625
1 changed files with 3 additions and 3 deletions

View File

@ -319,7 +319,7 @@ def cryptopia(bot, trigger):
@sopel.module.commands('cmc', 'coinmarketcap') @sopel.module.commands('cmc', 'coinmarketcap')
def cmc(bot, trigger): def cmc(bot, trigger):
try: try:
r = requests.get('https://api.coinmarketcap.com/v1/ticker?limit=500') r = requests.get('https://api.coinmarketcap.com/v1/ticker?limit=1000')
j = r.json() j = r.json()
except: except:
bot.say("Can't connect to API") bot.say("Can't connect to API")
@ -329,7 +329,7 @@ def cmc(bot, trigger):
if trigger.group(2).isdigit(): if trigger.group(2).isdigit():
rank = trigger.group(2) rank = trigger.group(2)
elif trigger.group(2) == 'random': elif trigger.group(2) == 'random':
rank = random.randint(1,500) rank = random.randint(1,1000)
else: else:
symbol = trigger.group(2) symbol = trigger.group(2)
symbol = symbol.upper() symbol = symbol.upper()
@ -363,7 +363,7 @@ def top(bot, trigger):
bot.say("You want to see the CMC top... how many? Pick a number 1 through 10") bot.say("You want to see the CMC top... how many? Pick a number 1 through 10")
else: else:
if type(trigger.group(2)) in (float, int): if type(trigger.group(2)) in (float, int):
limit = float(trigger.group(2)) limit = int(trigger.group(2))
mylist = range(1,limit + 1) mylist = range(1,limit + 1)
if limit > 10: if limit > 10:
bot.say("Too high! Max is 10!") bot.say("Too high! Max is 10!")