diff --git a/.gitignore b/.gitignore index 95e103e..9564245 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ __pycache__ commands.spec physqlsimplecipher .vscode -.gitattributes \ No newline at end of file +.gitattributes +*.json \ No newline at end of file diff --git a/__pycache__/commands.cpython-37.pyc b/__pycache__/commands.cpython-37.pyc index 43932b1..6bb4c2c 100644 Binary files a/__pycache__/commands.cpython-37.pyc and b/__pycache__/commands.cpython-37.pyc differ diff --git a/commands.py b/commands.py index a3825ba..e6061af 100644 --- a/commands.py +++ b/commands.py @@ -2015,17 +2015,21 @@ def rank_up(): else: url = 'http://ishin-production.aktsk.jp/user' r = requests.get(url, headers=headers) - current_rank = r.json()['user']['rank'] + current_rank = int(r.json()['user']['rank']) print('Your current rank is: ' +str(current_rank)) - goal_rank = int(input('What rank would you like to achieve? \n')) + goal_rank = (input('What rank would you like to achieve? \n')) print('Ok, farming till rank: ' +(goal_rank)) - levels_to_farm = (goal_rank) - (current_rank) + # just for bugtracking + # 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)) - - + #################################################################### @@ -2657,8 +2661,8 @@ def user_command_executor(command): medal_calculator() elif command == 'ezaplus': complete_unfinished_zbattles_plus() - # elif command == 'rankup': - # rank_up() + elif command == 'rankup': + rank_up() elif command == 'lrpan': lr_pan() elif command == 'bossrush':