[Cleanup] Fix [p]cleanup self inside DMs (#6197)

This commit is contained in:
Kreusada 2023-06-29 05:06:44 +01:00 committed by GitHub
parent 9c85917dad
commit 8ee3ac9352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,7 +148,7 @@ class Cleanup(commands.Cog):
""" """
Sends a notification to the channel that a certain number of messages have been deleted. Sends a notification to the channel that a certain number of messages have been deleted.
""" """
if not hasattr(channel, "guild") or await self.config.guild(channel.guild).notify(): if not channel.guild or await self.config.guild(channel.guild).notify():
if subtract_invoking: if subtract_invoking:
num -= 1 num -= 1
if num == 1: if num == 1: