aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2019-12-06 04:04:38 +1000
committerGravatar scragly <[email protected]>2019-12-06 04:04:38 +1000
commit44346a9c6b08b6b30ce1ece5020ee2725218d5c9 (patch)
treee9e1d48ffa1a76e04de6bb85734c65ac34e00b01
parentMerge pull request #328 from python-discord/aoc-announcement-mention-fix (diff)
Fix inaccurate annotations for custom checks.
-rw-r--r--bot/decorators.py4
1 files changed, 2 insertions, 2 deletions
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