Ejemplo n.º 1
0
    async def abyss(self, ctx):
        #try:
        cookies = get_cookies(ctx.author.id)
        gs.set_cookie(ltuid=cookies[1], ltoken=cookies[2])

        uid = get_uid(ctx.author.id)
        spiral_abyss = gs.get_spiral_abyss(uid, previous=True)
        stats = spiral_abyss['stats']
        for field, value in stats.items():
            await ctx.send(f'{field}: {value}')
Ejemplo n.º 2
0
 def test_spiral_abyss(self):
     data['spiral_abyss'] = [
         gs.get_spiral_abyss(uid, previous=False),
         gs.get_spiral_abyss(uid, previous=True)
     ]
Ejemplo n.º 3
0
    print(f"\nexplorations: ")
    for area in data['explorations']:
        print(
            f"{area['name']}: explored {area['explored']}% | {area['type']} level {area['level']}"
        )

elif action == '2':
    print(f'Getting characters for {uid}...\n')
    data = gs.get_all_characters(uid)

    data.sort(key=lambda x: (x['rarity'], x['level']), reverse=True)
    for char in data:
        print(
            f"{char['name']} ({char['rarity']}* {char['element']}): lvl {char['level']} C{char['constellation']}"
        )

elif action == '3':
    previous = input('Get previous season instead of current? [y/n] ') in 'yY'
    print(f'Getting spiral abyss info for {uid}...\n')
    data = gs.get_spiral_abyss(uid, previous=previous)
    print(
        f"season {data['season']} ({data['season_start_time']} - {data['season_end_time']})"
    )

    for field, value in data['stats'].items():
        print(f"{field.replace('_',' ')}: {value}")
    print('\ncharacter ranks:')
    for field, value in data['character_ranks'].items():
        print(f"{field.replace('_',' ')}: " +
              ', '.join(f"{i['name']} ({i['value']})" for i in value[:5]))
Ejemplo n.º 4
0
def test_spiral_abyss():
    abyss = [gs.get_spiral_abyss(uid), gs.get_spiral_abyss(uid, previous=True)]