[Cleanup] Delete command message when using [p]cleanup self (#4640)

* delete command message

* only delete command if can_mass_purge
This commit is contained in:
Ryan
2020-12-17 14:37:38 -05:00
committed by GitHub
parent d22ea2dd11
commit 3a12a9b47f

View File

@@ -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