diff options
author | 2022-08-16 16:29:28 -0400 | |
---|---|---|
committer | 2022-08-16 16:29:28 -0400 | |
commit | e68868e253128b9eb2035e5ea1bae93e67bda4f1 (patch) | |
tree | 8af5a805c70e0826b559b9e893aa96b4a6697383 | |
parent | Added mod alerted notice to auto-infractions (diff) |
Added newlines and non-mentioned mod role
-rw-r--r-- | bot/exts/moderation/infraction/_scheduler.py | 9 |
1 files 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. |