Skip to content

Commit c98b779

Browse files
AstreaTSSLordOfPolls
authored andcommitted
fix: copy checks when inheriting (#1342)
Co-authored-by: Astrea49 <25420078+Astrea49@users.noreply.github.com>
1 parent 3b33d56 commit c98b779

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interactions/models/internal/application_commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ def group(
721721
group_description=description,
722722
scopes=self.scopes,
723723
dm_permission=self.dm_permission,
724-
checks=self.checks if inherit_checks else [],
724+
checks=self.checks.copy() if inherit_checks else [],
725725
)
726726

727727
def subcommand(
@@ -758,7 +758,7 @@ def wrapper(call: Callable[..., Coroutine]) -> "SlashCommand":
758758
callback=call,
759759
scopes=self.scopes,
760760
nsfw=nsfw,
761-
checks=self.checks if inherit_checks else [],
761+
checks=self.checks.copy() if inherit_checks else [],
762762
)
763763

764764
return wrapper

0 commit comments

Comments
 (0)