diff options
| author | 2021-02-17 15:09:21 +0200 | |
|---|---|---|
| committer | 2021-02-17 15:09:21 +0200 | |
| commit | cd0e443656f0aca93691b19f3b80a6e2b7c0e228 (patch) | |
| tree | 55e8560d4fb2c13d745b48b6746143da5ee3b24c | |
| parent | Implement showing filterlist entry comment in alerts (diff) | |
Add missing None reason returns of filters
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/filters/filtering.py | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py index 6f1374cf4..0f403ca92 100644 --- a/bot/exts/filters/filtering.py +++ b/bot/exts/filters/filtering.py @@ -432,7 +432,7 @@ class Filtering(Cog):          # Make sure it's not a URL          if URL_RE.search(text): -            return False +            return False, None          watchlist_patterns = self._get_filterlist_items('filter_token', allowed=False)          for pattern in watchlist_patterns: @@ -445,7 +445,7 @@ class Filtering(Cog):      async def _has_urls(self, text: str) -> Tuple[bool, Optional[str]]:          """Returns True if the text contains one of the blacklisted URLs from the config file."""          if not URL_RE.search(text): -            return False +            return False, None          text = text.lower()          domain_blacklist = self._get_filterlist_items("domain_name", allowed=False) @@ -494,7 +494,7 @@ class Filtering(Cog):                  # Lack of a "guild" key in the JSON response indicates either an group DM invite, an                  # expired invite, or an invalid invite. The API does not currently differentiate                  # between invalid and expired invites -                return True +                return True, None              guild_id = guild.get("id")              guild_invite_whitelist = self._get_filterlist_items("guild_invite", allowed=True) | 
