From 3a12a9b47fd33d7b2b0f054724e9acad47f79e66 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 17 Dec 2020 14:37:38 -0500 Subject: [PATCH] [Cleanup] Delete command message when using `[p]cleanup self` (#4640) * delete command message * only delete command if can_mass_purge --- redbot/cogs/cleanup/cleanup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/redbot/cogs/cleanup/cleanup.py b/redbot/cogs/cleanup/cleanup.py index 8269d521d..928f79587 100644 --- a/redbot/cogs/cleanup/cleanup.py +++ b/redbot/cogs/cleanup/cleanup.py @@ -579,6 +579,8 @@ class Cleanup(commands.Cog): before=ctx.message, delete_pinned=delete_pinned, ) + if can_mass_purge: + to_delete.append(ctx.message) if ctx.guild: channel_name = "channel " + channel.name