Skip to content

Commit c5e7406

Browse files
authored
[commands] Unwrap Parameter if given as default to commands.parameter
1 parent b0c66b7 commit c5e7406

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

discord/ext/commands/parameters.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@ async def wave(ctx, to: discord.User = commands.parameter(default=lambda ctx: ct
247247
248248
.. versionadded:: 2.3
249249
"""
250+
if isinstance(default, Parameter):
251+
if displayed_default is empty:
252+
displayed_default = default._displayed_default
253+
254+
default = default._default
255+
250256
return Parameter(
251257
name='empty',
252258
kind=inspect.Parameter.POSITIONAL_OR_KEYWORD,

0 commit comments

Comments
 (0)