From c5e74068f0d0d84a27c557018aa15b3f2132e5c7 Mon Sep 17 00:00:00 2001 From: Soheab <33902984+Soheab@users.noreply.github.com> Date: Thu, 17 Oct 2024 00:48:49 +0200 Subject: [PATCH] [commands] Unwrap Parameter if given as default to commands.parameter --- discord/ext/commands/parameters.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/discord/ext/commands/parameters.py b/discord/ext/commands/parameters.py index 70df39534aef..33592c74a6b5 100644 --- a/discord/ext/commands/parameters.py +++ b/discord/ext/commands/parameters.py @@ -247,6 +247,12 @@ async def wave(ctx, to: discord.User = commands.parameter(default=lambda ctx: ct .. versionadded:: 2.3 """ + if isinstance(default, Parameter): + if displayed_default is empty: + displayed_default = default._displayed_default + + default = default._default + return Parameter( name='empty', kind=inspect.Parameter.POSITIONAL_OR_KEYWORD,