From 872281ea5faa44cf3659b1678174b1a713555288 Mon Sep 17 00:00:00 2001 From: ionite34 Date: Mon, 15 Aug 2022 14:07:22 -0400 Subject: Added mod alerted notice to auto-infractions --- bot/exts/moderation/infraction/_scheduler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py index c7f03b2e9..69c7d7afc 100644 --- a/bot/exts/moderation/infraction/_scheduler.py +++ b/bot/exts/moderation/infraction/_scheduler.py @@ -189,7 +189,10 @@ class InfractionScheduler: f"Infraction #{id_} actor is bot; including the reason in the confirmation message." ) if reason: - end_msg = f" (reason: {textwrap.shorten(reason, width=1500, placeholder='...')})" + end_msg = ( + f" (reason: {textwrap.shorten(reason, width=1500, placeholder='...')})" + " Moderators have been alerted for review" + ) purge = infraction.get("purge", "") -- cgit v1.2.3 From e68868e253128b9eb2035e5ea1bae93e67bda4f1 Mon Sep 17 00:00:00 2001 From: ionite34 Date: Tue, 16 Aug 2022 16:29:28 -0400 Subject: Added newlines and non-mentioned mod role --- bot/exts/moderation/infraction/_scheduler.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py index 69c7d7afc..0f8a55838 100644 --- a/bot/exts/moderation/infraction/_scheduler.py +++ b/bot/exts/moderation/infraction/_scheduler.py @@ -12,7 +12,7 @@ from discord.ext.commands import Context from bot import constants from bot.bot import Bot -from bot.constants import Colours +from bot.constants import Colours, Roles from bot.converters import MemberOrUser from bot.exts.moderation.infraction import _utils from bot.exts.moderation.modlog import ModLog @@ -190,8 +190,8 @@ class InfractionScheduler: ) if reason: end_msg = ( - f" (reason: {textwrap.shorten(reason, width=1500, placeholder='...')})" - " Moderators have been alerted for review" + f" (reason: {textwrap.shorten(reason, width=1500, placeholder='...')})." + f"\n\n<@&{Roles.moderators}> have been alerted for review" ) purge = infraction.get("purge", "") @@ -246,7 +246,8 @@ class InfractionScheduler: # Send a confirmation message to the invoking context. log.trace(f"Sending infraction #{id_} confirmation message.") - await ctx.send(f"{dm_result}{confirm_msg}{infr_message}.") + mentions = discord.AllowedMentions(users=[user], roles=False) + await ctx.send(f"{dm_result}{confirm_msg}{infr_message}.", allowed_mentions=mentions) # Send a log message to the mod log. # Don't use ctx.message.author for the actor; antispam only patches ctx.author. -- cgit v1.2.3 From c9d5aac1d71bdbee672355e75ee8e655892c8b6c Mon Sep 17 00:00:00 2001 From: ionite34 Date: Tue, 16 Aug 2022 17:35:44 -0400 Subject: Added article to automute message --- bot/exts/moderation/infraction/_scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py index 0f8a55838..280b0fb0c 100644 --- a/bot/exts/moderation/infraction/_scheduler.py +++ b/bot/exts/moderation/infraction/_scheduler.py @@ -191,7 +191,7 @@ class InfractionScheduler: if reason: end_msg = ( f" (reason: {textwrap.shorten(reason, width=1500, placeholder='...')})." - f"\n\n<@&{Roles.moderators}> have been alerted for review" + f"\n\nThe <@&{Roles.moderators}> have been alerted for review" ) purge = infraction.get("purge", "") -- cgit v1.2.3