File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 5
5
6
6
async def top_chat (update : Update , context : ContextTypes .DEFAULT_TYPE ):
7
7
# check if game mode is specified
8
- game_mode = 'classical '
8
+ game_mode = 'blitz '
9
9
if len (context .args ) > 0 :
10
10
game_mode = context .args [0 ].lower ()
11
11
@@ -24,9 +24,10 @@ async def top_chat(update: Update, context: ContextTypes.DEFAULT_TYPE):
24
24
25
25
if telegram_member .status not in ['left' , 'kicked' ]:
26
26
lichess_user = lichess .api .user (lichess_username )
27
- rating = lichess_user ['perfs' ][game_mode ]['rating' ]
28
- if rating is not None :
29
- ratings [lichess_username ] = rating
27
+ if not 'prov' in lichess_user ['perfs' ][game_mode ]:
28
+ rating = lichess_user ['perfs' ][game_mode ]['rating' ]
29
+ if rating is not None :
30
+ ratings [lichess_username ] = rating
30
31
31
32
except Exception as e :
32
33
print (f"Failed to retrieve { game_mode } rating for user { lichess_username } : { e } " )
You can’t perform that action at this time.
0 commit comments