Browse Source

[commands] Fix _fallback attr not being set on replace for Parameter

pull/10082/head
Alex Nørgaard 3 months ago
committed by GitHub
parent
commit
d95605839f
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      discord/ext/commands/parameters.py

4
discord/ext/commands/parameters.py

@ -135,7 +135,7 @@ class Parameter(inspect.Parameter):
if displayed_name is MISSING:
displayed_name = self._displayed_name
return self.__class__(
ret = self.__class__(
name=name,
kind=kind,
default=default,
@ -144,6 +144,8 @@ class Parameter(inspect.Parameter):
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')

Loading…
Cancel
Save