diff options
author | 2025-06-25 00:27:19 +0100 | |
---|---|---|
committer | 2025-06-25 00:30:16 +0100 | |
commit | dad74975fcc91bddd38e2c3cf4eb82190afcb214 (patch) | |
tree | f8a6374f2b93f92ef1ba0375efdd63a6931e0c10 | |
parent | Use partial messageable and message to tidy up infractions (diff) |
Only tidy-up infractions outside mod channels
-rw-r--r-- | bot/exts/moderation/infraction/_scheduler.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py index e10d94ad6..63f47b7de 100644 --- a/bot/exts/moderation/infraction/_scheduler.py +++ b/bot/exts/moderation/infraction/_scheduler.py @@ -321,7 +321,8 @@ class InfractionScheduler: mentions = discord.AllowedMentions(users=[user], roles=False) sent_msg = await ctx.send(f"{dm_result}{confirm_msg}{infr_message}.", allowed_mentions=mentions) - if infraction["actor"] == self.bot.user.id: + # Only tidy up bot issued infractions in non-mod channels. + if infraction["actor"] == self.bot.user.id and not is_mod_channel(ctx.channel): expire_message_time = datetime.now(UTC) + timedelta(hours=AUTOMATED_TIDY_UP_HOURS) log.trace(f"Scheduling message tidy for infraction #{id_} in {AUTOMATED_TIDY_UP_HOURS} hours.") |