Made config file more efficient.

This commit is contained in:
alwayscompiling
2022-07-13 22:02:40 -04:00
parent fedc8be778
commit 5155744ec5
3 changed files with 314 additions and 831 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ def open_highscores_data():
for boss, categories in config["highscore_table"].items():
data[boss] = {"message_id": 0}
boss_categories = {}
for category, category_config in categories.items(): # pylint: disable=unused-variable
for category in categories: # pylint: disable=unused-variable
rank_list = []
boss_categories[category] = rank_list
data[boss]["categories"] = boss_categories
+1 -1
View File
@@ -75,7 +75,7 @@ async def submit_score(
@param score: score to add
"""
boss_category_config = highscores_config["highscore_table"][boss_name][category]
boss_category_config = highscores_config["categories"][category]
# capping to 12 characters because runescape names are 12 characters long.
# Splitting on pipe. My discord has multiple names on account split by pipe.