File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
blackjackbot/lang/strings Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 5252 "reset_stats_confirm_button" : " Reset" ,
5353 "reset_stats_cancel_button" : " Cancel" ,
5454 "reset_stats_executed" : " Alright, I reset your statistics!" ,
55- "reset_stats_cancelled" : " Okay, I did not reset your statistics!"
55+ "reset_stats_cancelled" : " Okay, I did not reset your statistics!" ,
56+ "no_stats" : " You haven't played yet, there are no statistics for you."
5657}
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ def get_user_stats(user_id):
6363
6464 if played_games == 0 :
6565 # prevent division by zero errors
66- played_games = 1
66+ return translate ( "no_stats" )
6767
6868 last_played_formatted = datetime .utcfromtimestamp (last_played ).strftime ('%d.%m.%y %H:%M' )
6969 win_percentage = round (float (won_games ) / float (played_games ), 4 )
You can’t perform that action at this time.
0 commit comments