Skip to content

Commit

Permalink
[commands] Fix _fallback attr not being set on replace for Parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
AbstractUmbra authored Jan 16, 2025
1 parent 7db3911 commit d956058
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion discord/ext/commands/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def replace(
if displayed_name is MISSING:
displayed_name = self._displayed_name

return self.__class__(
ret = self.__class__(
name=name,
kind=kind,
default=default,
Expand All @@ -144,6 +144,8 @@ def replace(
displayed_default=displayed_default,
displayed_name=displayed_name,
)
ret._fallback = self._fallback
return ret

if not TYPE_CHECKING: # this is to prevent anything breaking if inspect internals change
name = _gen_property('name')
Expand Down

0 comments on commit d956058

Please sign in to comment.