Skip to content

Commit

Permalink
[commands] Fix =None being displayed in signatures for commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapptz committed Aug 10, 2023
1 parent ee99036 commit c67a0c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/ext/commands/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ def signature(self) -> str:
if not param.required:
# 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.
if param.displayed_default:
if param.default is not None and param.displayed_default:
result.append(
f'[{name}={param.displayed_default}]' if not greedy else f'[{name}={param.displayed_default}]...'
)
Expand Down

0 comments on commit c67a0c1

Please sign in to comment.