Skip to content

Commit d956058

Browse files
[commands] Fix _fallback attr not being set on replace for Parameter
1 parent 7db3911 commit d956058

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

discord/ext/commands/parameters.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def replace(
135135
if displayed_name is MISSING:
136136
displayed_name = self._displayed_name
137137

138-
return self.__class__(
138+
ret = self.__class__(
139139
name=name,
140140
kind=kind,
141141
default=default,
@@ -144,6 +144,8 @@ def replace(
144144
displayed_default=displayed_default,
145145
displayed_name=displayed_name,
146146
)
147+
ret._fallback = self._fallback
148+
return ret
147149

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

0 commit comments

Comments
 (0)