diff --git a/src/mudlib/commands/help.py b/src/mudlib/commands/help.py index e75c323..97a3285 100644 --- a/src/mudlib/commands/help.py +++ b/src/mudlib/commands/help.py @@ -213,16 +213,9 @@ async def cmd_commands(player: Player, args: str) -> None: else: other.append(defn) - def format_command(defn: CommandDefinition) -> str: - """Format a command with its aliases in parens.""" - if defn.aliases: - aliases_str = ", ".join(defn.aliases) - return f"{defn.name}({aliases_str})" - return defn.name - all_commands = movement + other all_commands.sort(key=lambda d: d.name) - names = [format_command(d) for d in all_commands] + names = [d.name for d in all_commands] await player.send(" ".join(names) + "\r\n") @@ -262,16 +255,9 @@ async def cmd_skills(player: Player, args: str) -> None: elif defn.help.startswith("Defend with"): defenses.append(defn) - def format_command(defn: CommandDefinition) -> str: - """Format a command with its aliases in parens.""" - if defn.aliases: - aliases_str = ", ".join(defn.aliases) - return f"{defn.name}({aliases_str})" - return defn.name - all_skills = attacks + defenses all_skills.sort(key=lambda d: d.name) - names = [format_command(d) for d in all_skills] + names = [d.name for d in all_skills] await player.send(" ".join(names) + "\r\n")