From 44346a9c6b08b6b30ce1ece5020ee2725218d5c9 Mon Sep 17 00:00:00 2001 From: scragly <29337040+scragly@users.noreply.github.com> Date: Fri, 6 Dec 2019 04:04:38 +1000 Subject: Fix inaccurate annotations for custom checks. --- bot/decorators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/decorators.py') diff --git a/bot/decorators.py b/bot/decorators.py index 58f67a15..d0371df4 100644 --- a/bot/decorators.py +++ b/bot/decorators.py @@ -20,7 +20,7 @@ class InChannelCheckFailure(CheckFailure): pass -def with_role(*role_ids: int) -> bool: +def with_role(*role_ids: int) -> typing.Callable: """Check to see whether the invoking user has any of the roles specified in role_ids.""" async def predicate(ctx: Context) -> bool: if not ctx.guild: # Return False in a DM @@ -43,7 +43,7 @@ def with_role(*role_ids: int) -> bool: return commands.check(predicate) -def without_role(*role_ids: int) -> bool: +def without_role(*role_ids: int) -> typing.Callable: """Check whether the invoking user does not have all of the roles specified in role_ids.""" async def predicate(ctx: Context) -> bool: if not ctx.guild: # Return False in a DM -- cgit v1.2.3