Made config file more efficient.
This commit is contained in:
@@ -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
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user