diff options
author | 2025-03-30 16:58:08 +0100 | |
---|---|---|
committer | 2025-03-30 20:07:24 +0100 | |
commit | 72e8fe9ebad662615a0cf34417ed865c5044a780 (patch) | |
tree | afbfb9db1c80283c9c8fe8ba191fa74fe3663405 | |
parent | Bump getsentry/action-release from 1 to 3 (#3305) (diff) |
Remove pings when auto-banning in filters
Mods no longer want to be pinged when a fitler results in an auto ban, but we still want the message to be sent to mod-alerts.
-rw-r--r-- | bot/exts/filtering/filtering.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/filtering/filtering.py b/bot/exts/filtering/filtering.py index 01eba6afc..97b194d65 100644 --- a/bot/exts/filtering/filtering.py +++ b/bot/exts/filtering/filtering.py @@ -978,7 +978,10 @@ class Filtering(Cog): result_actions = None if actions: result_actions = reduce(ActionSettings.union, actions) - + # If the action is a ban, mods don't want to be pinged. + if infr_action := result_actions.get("infraction_and_notification"): + if infr_action.infraction_type == Infraction.BAN: + result_actions.pop("mentions", None) return result_actions, messages, triggers async def _send_alert(self, ctx: FilterContext, triggered_filters: dict[FilterList, Iterable[str]]) -> None: |