mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-18 15:06:07 +00:00
[commands] Unwrap Parameter if given as default to commands.parameter
This commit is contained in:
parent
b0c66b7734
commit
c5e74068f0
@ -247,6 +247,12 @@ def parameter(
|
||||
|
||||
.. 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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user