mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-09 23:39:50 +00:00
[commands] Fix =None being displayed in signatures for commands
This commit is contained in:
parent
ee99036659
commit
c67a0c1972
@ -1209,7 +1209,7 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
|
|||||||
if not param.required:
|
if not param.required:
|
||||||
# We don't want None or '' to trigger the [name=value] case and instead it should
|
# We don't want None or '' to trigger the [name=value] case and instead it should
|
||||||
# do [name] since [name=None] or [name=] are not exactly useful for the user.
|
# do [name] since [name=None] or [name=] are not exactly useful for the user.
|
||||||
if param.displayed_default:
|
if param.default is not None and param.displayed_default:
|
||||||
result.append(
|
result.append(
|
||||||
f'[{name}={param.displayed_default}]' if not greedy else f'[{name}={param.displayed_default}]...'
|
f'[{name}={param.displayed_default}]' if not greedy else f'[{name}={param.displayed_default}]...'
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user