Copy internal attributes for command decorator state

This allows for copies to not clear the state the decorators had
set prior.
This commit is contained in:
Rapptz 2022-04-14 17:45:27 -04:00
parent e541be0427
commit 9ff90d7863

View File

@ -389,21 +389,21 @@ def _extract_parameters_from_callback(func: Callable[..., Any], globalns: Dict[s
except AttributeError:
pass
else:
_populate_renames(result, renames)
_populate_renames(result, renames.copy())
try:
choices = func.__discord_app_commands_param_choices__
except AttributeError:
pass
else:
_populate_choices(result, choices)
_populate_choices(result, choices.copy())
try:
autocomplete = func.__discord_app_commands_param_autocomplete__
except AttributeError:
pass
else:
_populate_autocomplete(result, autocomplete)
_populate_autocomplete(result, autocomplete.copy())
return result