Use the new category pad length variable.
This commit is contained in:
+3
-3
@@ -27,7 +27,7 @@ def format_highscore_message(guild: Guild, table: Table) -> str:
|
||||
|
||||
# Gather all categories and add to string
|
||||
for category in table.categories:
|
||||
ret_string += f"{category.name}".ljust(26, " ")
|
||||
ret_string += f"{category.name}".ljust(guild.category_pad_length, " ")
|
||||
ret_string += "\n"
|
||||
|
||||
# list rankings in a single line. Start with first place for each category and then continue
|
||||
@@ -49,9 +49,9 @@ def format_highscore_message(guild: Guild, table: Table) -> str:
|
||||
else:
|
||||
score = score.rjust(7, " ")
|
||||
|
||||
ret_string += f"{i+1}: {username} - {score}".ljust(26, " ")
|
||||
ret_string += f"{i+1}: {username} - {score}".ljust(guild.category_pad_length, " ")
|
||||
else:
|
||||
ret_string += f"{i+1}: submit your score".ljust(26, " ")
|
||||
ret_string += f"{i+1}:".ljust(guild.category_pad_length, " ")
|
||||
ret_string += "\n"
|
||||
|
||||
return ret_string + "```"
|
||||
|
||||
Reference in New Issue
Block a user