From 2ed8805539da3d91935b4685955d4eb989afaff8 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Thu, 10 Jul 2025 14:16:32 +0100 Subject: Add exemption for new cog to _is_devops --- arthur/bot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arthur/bot.py') 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 -- cgit v1.2.3