mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-18 23:15:48 +00:00
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:
parent
e541be0427
commit
9ff90d7863
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user