Correct submission listener usage of HighscoresData.
This commit is contained in:
@@ -122,6 +122,15 @@ class HighscoresData:
|
||||
"""
|
||||
return self._config["highscore_size"]
|
||||
|
||||
def get_config_time_record(self, category: str) -> bool:
|
||||
"""
|
||||
Tells if the category is a time record
|
||||
|
||||
@param category: category name to retrieve from.
|
||||
@returns: bool indicating time record or not.
|
||||
"""
|
||||
return self._config["categories"][category]["is_time_record"]
|
||||
|
||||
def get_guilds(self) -> "list[int]":
|
||||
"""
|
||||
Gets a list of guilds tracked by data
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ def format_highscore_message(boss_name: str, guild_id: int):
|
||||
|
||||
# pad score to correct length
|
||||
# MM:SS.ms is 7 characters long
|
||||
if highscores_data.get_config_is_category_time_record(key):
|
||||
if highscores_data.get_config_time_record(key):
|
||||
# if there are single digit minutes, add a space for formatting.
|
||||
if score.find(":") and len(score.split(":", maxsplit=1)[0]) < 2:
|
||||
score = " " + score
|
||||
|
||||
Reference in New Issue
Block a user