post-scores command now populates the highscores channel with formatted messages.

This commit is contained in:
alwayscompiling
2022-06-26 18:01:09 -04:00
parent 17cb66870a
commit bd9a48cc1f
3 changed files with 24 additions and 14 deletions
+8 -5
View File
@@ -12,19 +12,20 @@ def format_boss_highscore(boss):
@return the formatted string
"""
boss_name = boss["boss"]
ret_string = f"**{boss_name}**/n"
ret_string = f"**{boss_name}**\n"
# Gather all categories and add to string
for category in highscores.highscores_config["categories"]:
category_name = category["category"]
ret_string += f"{category_name}\t\t"
ret_string += "\n"
highscore_size = highscores.highscores_config["highscore_size"]
# list rankings
for x in range(highscore_size):
for i in range(highscore_size):
for category in highscores.highscores_config["categories"]:
ret_string += f"{x}: (name here)\t\t"
ret_string += f"{i+1}: (name here)\t\t"
ret_string += "\n"
# if boss is hardmode, repeat above for hardmode applicable categories
@@ -36,7 +37,9 @@ def format_boss_highscore(boss):
ret_string += "\n"
for x in range(highscore_size):
for i in range(highscore_size):
for category in highscores.highscores_config["categories"]:
ret_string += f"{x}: (name here)\t\t"
if category["hardmode"]:
ret_string += f"{i+1}: (name here)\t\t"
ret_string += "\n"
return ret_string