diff --git a/app/cogs/tarkov.py b/app/cogs/tarkov.py index ffcfae0b..2cfc266e 100755 --- a/app/cogs/tarkov.py +++ b/app/cogs/tarkov.py @@ -43,6 +43,7 @@ class Tarkov(commands.Cog): if spawns_from_api != known_spawns: embed.set_author(name="🎲 Boss spawn chances have updated 🎲") + # Send both dicts to this method to see if any spawn rates have been updated changes_dict = tarkov.compare_boss_spawns(known_spawns, spawns_from_api) for level, boss in changes_dict.items(): diff --git a/app/tarkov.py b/app/tarkov.py index 1143403d..616bbc24 100755 --- a/app/tarkov.py +++ b/app/tarkov.py @@ -1,7 +1,6 @@ from bs4 import BeautifulSoup import requests import random -import json def request_wiki(url, heading): @@ -88,19 +87,6 @@ def get_tarkov_boss_info(): def compare_boss_spawns(known_spawns: dict, spawns_from_api: dict) -> dict: changes = {} # To store the changes - # diff = DeepDiff(known_spawns, spawns_from_api, ignore_order=True, verbose_level=2) - - # # Get the differences between the two JSON blobs - # # Iterate through the diff to find spawnChance differences - # for key, changes in diff.items(): - # if key == 'values_changed': - # for path, change in changes.items(): - # # Access the level and boss name directly from the path - # level, boss = path.split('[')[1].split(']')[0], path.split('[')[2].split(']')[0] - # # Print the relevant difference in spawnChance - # if 'new_value' in change: - # print(f"Level: {level}, Boss: {boss}, Diff in spawnChance: {change['old_value']} -> {change['new_value']}") - for level in known_spawns: level_changes = {} # Store changes for each level for boss in known_spawns.get(level, {}):