From 732f89b9e182f6e3ce54608f7019c27508603f95 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Thu, 6 Jul 2023 23:52:17 -0400 Subject: [PATCH] [commands] Fix =None being displayed in signatures for commands --- discord/ext/commands/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index efd7b09d2..045f63dc6 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -1209,7 +1209,7 @@ class Command(_BaseCommand, Generic[CogT, P, T]): 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}]...' )