diff options
author | 2025-07-10 14:16:32 +0100 | |
---|---|---|
committer | 2025-07-10 14:17:07 +0100 | |
commit | 2ed8805539da3d91935b4685955d4eb989afaff8 (patch) | |
tree | 00f9d1b00f877cc3bf62a39224e46c42f0a853a2 | |
parent | Add new GitHub extension (diff) |
Add exemption for new cog to _is_devops
-rw-r--r-- | arthur/bot.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arthur/bot.py b/arthur/bot.py index 86db7f2..c9b572b 100644 --- a/arthur/bot.py +++ b/arthur/bot.py @@ -24,7 +24,7 @@ class KingArthur(BotBase): super().__init__(*args, **kwargs) self.add_check(self._is_devops) - async def _is_devops(self, ctx: commands.Context | Interaction) -> bool: + async def _is_devops(self, ctx: commands.Context | Interaction) -> bool: # noqa: PLR0911 """Check all commands are executed by authorised personnel.""" u = ctx.user if isinstance(ctx, Interaction) else ctx.author if await arthur.instance.is_owner(u): @@ -38,6 +38,10 @@ class KingArthur(BotBase): if ctx.command.name in {"ed", "rules", "monitor"}: return True + if ctx.command.cog_name == "GitHubManagement": + # Commands in this cog have explicit additional checks. + return True + if not ctx.guild: return False |