aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mina <[email protected]>2022-08-17 17:18:56 -0400
committerGravatar GitHub <[email protected]>2022-08-17 17:18:56 -0400
commita441f9db45f00b04932b0c46095bc9083a3a4555 (patch)
treede187bddff76c2616456ca7ffb7cd27c76399c67
parentMerge pull request #2252 from python-discord/Resolve-silence-test-failures (diff)
parentMerge branch 'main' into automute-message (diff)
Merge pull request #2251 from python-discord/automute-message
Added mod alerted notice to auto-infractions
-rw-r--r--bot/exts/moderation/infraction/_scheduler.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py
index c7f03b2e9..280b0fb0c 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
@@ -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='...')})."
+ f"\n\nThe <@&{Roles.moderators}> have been alerted for review"
+ )
purge = infraction.get("purge", "")
@@ -243,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.