aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mina <[email protected]>2022-02-18 17:22:16 -0500
committerGravatar minalike <[email protected]>2022-02-19 15:30:23 -0500
commit7eea60288866322836956a7b3689e49a3e9c5c41 (patch)
tree185403ba5908e2ac8192204dee874aab9685dcf5
parentMerge pull request #2097 from python-discord/fix-bot-2004 (diff)
Add user ID in message content for mod-alerts, but not for autobans
-rw-r--r--bot/exts/filters/antispam.py1
-rw-r--r--bot/exts/filters/filtering.py8
2 files changed, 7 insertions, 2 deletions
diff --git a/bot/exts/filters/antispam.py b/bot/exts/filters/antispam.py
index ddfd11231..bcd845a43 100644
--- a/bot/exts/filters/antispam.py
+++ b/bot/exts/filters/antispam.py
@@ -103,6 +103,7 @@ class DeletionContext:
mod_alert_message += content
await modlog.send_log_message(
+ content=", ".join(str(m.id) for m in self.members), # quality-of-life improvement for mobile moderators
icon_url=Icons.filtering,
colour=Colour(Colours.soft_red),
title="Spam detected!",
diff --git a/bot/exts/filters/filtering.py b/bot/exts/filters/filtering.py
index 9d491baa5..f44b28125 100644
--- a/bot/exts/filters/filtering.py
+++ b/bot/exts/filters/filtering.py
@@ -256,6 +256,7 @@ class Filtering(Cog):
)
await self.mod_log.send_log_message(
+ content=str(member.id), # quality-of-life improvement for mobile moderators
icon_url=Icons.token_removed,
colour=Colours.soft_red,
title="Username filtering alert",
@@ -423,9 +424,12 @@ class Filtering(Cog):
# Allow specific filters to override ping_everyone
ping_everyone = Filter.ping_everyone and _filter.get("ping_everyone", True)
- # If we are going to autoban, we don't want to ping
+ content = str(msg.author.id) # quality-of-life improvement for mobile moderators
+
+ # If we are going to autoban, we don't want to ping and don't need the user ID
if reason and "[autoban]" in reason:
ping_everyone = False
+ content = None
eval_msg = "using !eval " if is_eval else ""
footer = f"Reason: {reason}" if reason else None
@@ -439,7 +443,7 @@ class Filtering(Cog):
# Send pretty mod log embed to mod-alerts
await self.mod_log.send_log_message(
- content=str(msg.author.id), # quality-of-life improvement for mobile moderators to copy & paste
+ content=content,
icon_url=Icons.filtering,
colour=Colour(Colours.soft_red),
title=f"{_filter['type'].title()} triggered!",