mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-03 08:35:53 +00:00
[commands] Unwrap Parameter if given as default to commands.parameter
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user