diff options
author | 2021-03-06 17:44:34 +0200 | |
---|---|---|
committer | 2021-03-06 17:44:34 +0200 | |
commit | a98ecbfd2e3446ca9a17566220c41235d1328fcb (patch) | |
tree | ae10474b1e25adbc51b413ae5ec6bb40cd0a5eec | |
parent | Merge pull request #1402 from python-discord/ks123/watchlist-trigger-reason (diff) |
Filtering hotfix
Bug caused by an outdated function signature in a previous commit in the #1402 PR
-rw-r--r-- | bot/exts/filters/filtering.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py index 4093ba4ad..946bbf2c3 100644 --- a/bot/exts/filters/filtering.py +++ b/bot/exts/filters/filtering.py @@ -240,7 +240,13 @@ class Filtering(Cog): # We also do not need to worry about filters that take the full message, # since all we have is an arbitrary string. if _filter["enabled"] and _filter["content_only"]: - match, reason = await _filter["function"](result) + filter_result = await _filter["function"](result) + reason = None + + if isinstance(filter_result, tuple): + match, reason = filter_result + else: + match = filter_result if match: # If this is a filter (not a watchlist), we set the variable so we know |