diff options
author | 2021-12-31 19:04:00 +0000 | |
---|---|---|
committer | 2022-02-16 22:12:04 +0000 | |
commit | fdcdaac97f055285cee82354a9a1352dca002194 (patch) | |
tree | 83167b521b84e21ef5842dcd3dbf10710e1ce3b9 | |
parent | Add more aliases to purgeban (diff) |
Don't append clean log if no clean was done from purge ban
-rw-r--r-- | bot/exts/moderation/infraction/infractions.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/exts/moderation/infraction/infractions.py b/bot/exts/moderation/infraction/infractions.py index e2c4c9ee4..32ff376cf 100644 --- a/bot/exts/moderation/infraction/infractions.py +++ b/bot/exts/moderation/infraction/infractions.py @@ -132,6 +132,9 @@ class Infractions(InfractionScheduler, commands.Cog): first_limit=clean_time, attempt_delete_invocation=False, ) + if not log_url: + # Cleaning failed, or there were no messages to clean, exit early. + return infr_manage_cog: t.Optional[ModManagement] = self.bot.get_cog("ModManagement") if infr_manage_cog is None: |