From 44451dc6e12e074376f6693c64f686f2379c00c3 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Thu, 15 Jul 2021 19:07:53 -0700 Subject: Disallow resending hidden infractions --- bot/exts/moderation/infraction/management.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot/exts/moderation/infraction/management.py b/bot/exts/moderation/infraction/management.py index 813559030..aeadee9d0 100644 --- a/bot/exts/moderation/infraction/management.py +++ b/bot/exts/moderation/infraction/management.py @@ -47,6 +47,10 @@ class ModManagement(commands.Cog): @infraction_group.command(name="resend", aliases=("send", "rs", "dm")) async def infraction_resend(self, ctx: Context, infraction: Infraction) -> None: """Resend a DM to a user about a given infraction of theirs.""" + if infraction["hidden"]: + await ctx.send(f"{constants.Emojis.failmail} You may not resend hidden infractions.") + return + id_ = infraction["id"] if await _utils.notify_infraction(infraction): await ctx.send(f":incoming_envelope: Resent DM for infraction `{id_}`.") -- cgit v1.2.3