aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/moderation/clean.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/moderation/clean.py b/bot/exts/moderation/clean.py
index e198dde9c..2e3f9ac77 100644
--- a/bot/exts/moderation/clean.py
+++ b/bot/exts/moderation/clean.py
@@ -187,6 +187,7 @@ class Clean(Cog):
# Are we already performing a clean?
if self.cleaning:
raise MaxConcurrencyReached("Please wait for the currently ongoing clean operation to complete.")
+ self.cleaning = True
# Set up the correct predicate
if bots_only:
@@ -214,8 +215,6 @@ class Clean(Cog):
# Invocation message has already been deleted
log.info("Tried to delete invocation message, but it was already deleted.")
- self.cleaning = True
-
if use_cache:
message_mappings, message_ids = self._get_messages_from_cache(amount=amount, to_delete=predicate)
else: