Skip to content

Commit dad7497

Browse files
committed
Only tidy-up infractions outside mod channels
1 parent a7872f5 commit dad7497

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bot/exts/moderation/infraction/_scheduler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ async def apply_infraction(
321321
mentions = discord.AllowedMentions(users=[user], roles=False)
322322
sent_msg = await ctx.send(f"{dm_result}{confirm_msg}{infr_message}.", allowed_mentions=mentions)
323323

324-
if infraction["actor"] == self.bot.user.id:
324+
# Only tidy up bot issued infractions in non-mod channels.
325+
if infraction["actor"] == self.bot.user.id and not is_mod_channel(ctx.channel):
325326
expire_message_time = datetime.now(UTC) + timedelta(hours=AUTOMATED_TIDY_UP_HOURS)
326327

327328
log.trace(f"Scheduling message tidy for infraction #{id_} in {AUTOMATED_TIDY_UP_HOURS} hours.")

0 commit comments

Comments
 (0)