This repository was archived by the owner on Aug 19, 2018. It is now read-only.
File tree 2 files changed +14
-13
lines changed
2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change 28
28
path .dirname (path .realpath (__file__ )),
29
29
'chests.json'
30
30
)
31
+
31
32
with open (_path ) as f :
32
33
CHESTS = json .load (f )
33
34
Original file line number Diff line number Diff line change @@ -8,22 +8,22 @@ async def main():
8
8
profile = await client .get_profile ('2CYUUCC8' )
9
9
10
10
print (profile )
11
- print (profile .current_trophies )
11
+ print ('Current Trophies: ' + str (profile .current_trophies ))
12
+ chest_cycle = ', ' .join ([profile .get_chest (x ) for x in range (10 )])
13
+ print (chest_cycle ) # next 9 chests.
12
14
13
15
await profile .update () # updating the info
14
16
15
- clan = await profile .get_clan () # get the players full clan info
17
+ try :
18
+ clan = await profile .get_clan () # get the players full clan info
19
+ except ValueError :
20
+ print ('No Clan' )
21
+ else :
22
+ print ('Clan: ' + str (clan ))
23
+ print ('Members: ' + str (len (clan .members )))
24
+ await clan .update () # updating the info
25
+ highest = await clan .members [0 ].get_profile () # top player
26
+ print ('Clan Top Player: ' + str (highest ))
16
27
17
- chests = profile .get_chests ()
18
-
19
- print (clan )
20
- print (len (clan .members ))
21
-
22
- await clan .update () # updating the info
23
-
24
- highest = await clan .members [0 ].get_profile ()
25
-
26
- print (highest ) # top player
27
-
28
28
loop = asyncio .get_event_loop ()
29
29
loop .run_until_complete (main ())
You can’t perform that action at this time.
0 commit comments