aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ChrisJL <[email protected]>2022-02-19 20:35:23 +0000
committerGravatar GitHub <[email protected]>2022-02-19 20:35:23 +0000
commit4f801c824aeb8cd01cb634b2f9f8921149e95961 (patch)
tree9a8cb8fbf484659df0e357f1e85bc3ecce3d92a1
parentMerge pull request #2084 from python-discord/thread-bumper-cog (diff)
parentMerge branch 'main' into enhancement/uid-mod-alerts2 (diff)
Merge pull request #2098 from minalike/enhancement/uid-mod-alerts2
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!",