diff --git a/cogs/commands/settings_management.py b/cogs/commands/settings_management.py index 8ccd8ad..6293dcf 100644 --- a/cogs/commands/settings_management.py +++ b/cogs/commands/settings_management.py @@ -114,7 +114,7 @@ class SettingsManagementCog(commands.Cog, name="Settings Management"): """ @set.subcommand( - description="Set character length for a category. Can cut off usernames if is too short. Affects all categories." + description="Set character length for a category. Can cut off username/score. Affects all categories." ) async def category_pad_length( self, diff --git a/utilities/utils.py b/utilities/utils.py index fae5544..370a6cd 100644 --- a/utilities/utils.py +++ b/utilities/utils.py @@ -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 + "```"