diff options
author | 2021-07-15 19:07:53 -0700 | |
---|---|---|
committer | 2021-07-15 19:10:50 -0700 | |
commit | 44451dc6e12e074376f6693c64f686f2379c00c3 (patch) | |
tree | 18afc41d4a155408432216648358ec6fadd07582 | |
parent | Fix superstarify reason displaying the incorrect nickname (diff) |
Disallow resending hidden infractions
-rw-r--r-- | bot/exts/moderation/infraction/management.py | 4 |
1 files changed, 4 insertions, 0 deletions
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_}`.") |