From 907f802be20d8866649444665ac0b1acc13f310b Mon Sep 17 00:00:00 2001 From: BobDotCom <71356958+BobDotCom@users.noreply.github.com> Date: Thu, 10 Mar 2022 13:02:25 -0600 Subject: [PATCH] Revert "Run parent checks in `can_run` (#1027)" This reverts commit e9aa339f57b80af56156444b7982f1cf611c1b1e. --- discord/commands/core.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/discord/commands/core.py b/discord/commands/core.py index fcaf3bc13d..e48db22904 100644 --- a/discord/commands/core.py +++ b/discord/commands/core.py @@ -317,10 +317,6 @@ async def can_run(self, ctx: ApplicationContext) -> bool: raise CheckFailure(f"The global check functions for command {self.name} failed.") predicates = self.checks - if self.parent is not None: - # parent checks should be ran first - predicates = self.parent.checks + predicates - if not predicates: # since we have no checks, then we just return True. return True @@ -902,7 +898,7 @@ def __init__( self.subcommands: List[Union[SlashCommand, SlashCommandGroup]] = self.__initial_commands__ self.guild_ids = guild_ids self.parent = parent - self.checks = kwargs.get("checks", []) + self.checks = [] self._before_invoke = None self._after_invoke = None