diff options
author | 2022-08-17 21:40:04 -0400 | |
---|---|---|
committer | 2022-08-17 21:40:04 -0400 | |
commit | 7ce69fe7c4724d6ad867ddb6d5be2f1f15b1166b (patch) | |
tree | 87cae31f7b0fa796dd06a87b3d00e300fae2d28f | |
parent | Removed unused datetime import (diff) | |
parent | Merge pull request #2251 from python-discord/automute-message (diff) |
Merge branch 'main' into infraction-durations
-rw-r--r-- | bot/exts/moderation/infraction/_scheduler.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py index cb3f7149f..655290559 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 @@ -192,7 +192,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", "") @@ -246,7 +249,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. |