diff --git a/tanjun/__init__.py b/tanjun/__init__.py index 81fcd8889..b1d11e1c7 100644 --- a/tanjun/__init__.py +++ b/tanjun/__init__.py @@ -119,6 +119,7 @@ async def main() -> None: "with_owner_check", "with_author_permission_check", "with_own_permission_check", + "with_any_role_check", # clients.py "clients", "as_loader", diff --git a/tanjun/checks.py b/tanjun/checks.py index d4c8ad04b..b99b67874 100644 --- a/tanjun/checks.py +++ b/tanjun/checks.py @@ -43,6 +43,7 @@ "GuildCheck", "AuthorPermissionCheck", "OwnPermissionCheck", + "HasAnyRoleCheck", "with_check", "with_dm_check", "with_guild_check", @@ -51,6 +52,7 @@ "with_owner_check", "with_author_permission_check", "with_own_permission_check", + "with_any_role_check", ] import typing @@ -687,7 +689,7 @@ def with_any_role_check( error_message: typing.Optional[str] = "You do not have the required roles to use this command!", halt_execution: bool = False, ) -> collections.Callable[[CommandT], CommandT]: - """Only let a command run if the author has a specific role. + """Only let a command run if the author has a specific role and the command is called in a guild. Parameters ----------