Skip to content

Commit 2ed8805

Browse files
committed
Add exemption for new cog to _is_devops
1 parent 2d72177 commit 2ed8805

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

arthur/bot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(self, *args: list[Any], **kwargs: dict[str, Any]) -> None:
2424
super().__init__(*args, **kwargs)
2525
self.add_check(self._is_devops)
2626

27-
async def _is_devops(self, ctx: commands.Context | Interaction) -> bool:
27+
async def _is_devops(self, ctx: commands.Context | Interaction) -> bool: # noqa: PLR0911
2828
"""Check all commands are executed by authorised personnel."""
2929
u = ctx.user if isinstance(ctx, Interaction) else ctx.author
3030
if await arthur.instance.is_owner(u):
@@ -38,6 +38,10 @@ async def _is_devops(self, ctx: commands.Context | Interaction) -> bool:
3838
if ctx.command.name in {"ed", "rules", "monitor"}:
3939
return True
4040

41+
if ctx.command.cog_name == "GitHubManagement":
42+
# Commands in this cog have explicit additional checks.
43+
return True
44+
4145
if not ctx.guild:
4246
return False
4347

0 commit comments

Comments
 (0)