aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-10-25 22:33:35 +0200
committerGravatar GitHub <[email protected]>2021-10-25 22:33:35 +0200
commit4594b2b85d714a5e9a65c3ae6e2a2264b1c9b38d (patch)
treee8cc73bf9fa137bd450ca9f4e35393e9607d9681
parentFiltering: fix ban flow (diff)
Filtering: update auto-ban comments
Co-authored-by: ChrisJL <[email protected]>
-rw-r--r--bot/exts/filters/filtering.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py
index 30b447620..804f60547 100644
--- a/bot/exts/filters/filtering.py
+++ b/bot/exts/filters/filtering.py
@@ -364,10 +364,11 @@ class Filtering(Cog):
stats = self._add_stats(filter_name, match, msg.content)
await self._send_log(filter_name, _filter, msg, stats, reason)
- # If the filter reason contains `[autoban]`, we want to indeed ban
+ # If the filter reason contains `[autoban]`, we want to auto-ban the user
if reason and "[autoban]" in reason.lower():
- # We create a new context from that message and make sure the staffer is the bot
- # and the feedback message is sent in #mod-alert
+ # Create a new context, with the author as is the bot, and the channel as #mod-alerts.
+ # This sends the ban confirmation directly under watchlist trigger embed, to inform
+ # mods that the user was auto-banned for the message.
context = await self.bot.get_context(msg)
context.author = self.bot.get_guild(Guild.id).get_member(self.bot.user.id)
context.channel = self.bot.get_channel(Channels.mod_alerts)