aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2019-10-24 15:22:40 +0800
committerGravatar kosayoda <[email protected]>2019-10-24 15:22:40 +0800
commit7ad9b1b96cba59818943ada569ddbba1d092069b (patch)
treeb82376fcba7120fda5c3a2728c7ce61eeff56008
parentRename `triggered` to `match` (diff)
Fix incorrect type hint for return value
-rw-r--r--bot/cogs/filtering.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py
index 13b8b9678..ec387ac40 100644
--- a/bot/cogs/filtering.py
+++ b/bot/cogs/filtering.py
@@ -241,7 +241,7 @@ class Filtering(Cog):
break # We don't want multiple filters to trigger
@staticmethod
- async def _has_watchlist_words(text: str) -> bool:
+ async def _has_watchlist_words(text: str) -> Union[bool, re.Match]:
"""
Returns True if the text contains one of the regular expressions from the word_watchlist in our filter config.
@@ -255,7 +255,7 @@ class Filtering(Cog):
return False
@staticmethod
- async def _has_watchlist_tokens(text: str) -> bool:
+ async def _has_watchlist_tokens(text: str) -> Union[bool, re.Match]:
"""
Returns True if the text contains one of the regular expressions from the token_watchlist in our filter config.