diff options
author | 2025-03-31 19:04:04 +0300 | |
---|---|---|
committer | 2025-03-31 19:04:04 +0300 | |
commit | 6236a4cd018010804b916d97a31af23659a244a0 (patch) | |
tree | afbfb9db1c80283c9c8fe8ba191fa74fe3663405 | |
parent | Bump getsentry/action-release from 1 to 3 (#3305) (diff) | |
parent | Remove pings when auto-banning in filters (diff) |
Merge pull request #3306 from python-discord/remove-ping-on-auto-ban
Remove pings when auto-banning in filters
-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: |