From c1b9f96a48e68bbcc4e4a1dc541fc82c88305c82 Mon Sep 17 00:00:00 2001 From: Pawel Orzech Date: Thu, 8 Aug 2019 11:40:48 +0100 Subject: [PATCH] added what will happen when your goal rank and current rank are the same --- commands.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/commands.py b/commands.py index e6061af..3af09e1 100644 --- a/commands.py +++ b/commands.py @@ -2025,12 +2025,18 @@ def rank_up(): # with open('personal.json', 'w') as json_file: # json.dump(r.json(), json_file) - levels_to_farm = int(goal_rank) - int(r.json()['user']['rank']) print('Levels to farm: ' +str(levels_to_farm)) - - + while current_rank < goal_rank: + #If your current rank is lower than goal rank we gonna farm. + + + if int(goal_rank) == int(current_rank): + #If your current rank and goal rank are the same we are going to stop farming. + print('It is done. Your rank is: ' +str(goal_rank)) + + ####################################################################