[commands] Add displayed_name to commands.Parameter

This commit is contained in:
Soheab_
2023-06-11 18:38:39 +02:00
committed by GitHub
parent d34a88411d
commit 94bf7d8644
4 changed files with 39 additions and 10 deletions

View File

@ -1166,7 +1166,7 @@ class DefaultHelpCommand(HelpCommand):
get_width = discord.utils._string_width
for argument in arguments:
name = argument.name
name = argument.displayed_name or argument.name
width = max_size - (get_width(name) - len(name))
entry = f'{self.indent * " "}{name:<{width}} {argument.description or self.default_argument_description}'
# we do not want to shorten the default value, if any.