Skip to content

Commit

Permalink
[Cleanup] Fix [p]cleanup self inside DMs (#6197)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreusada authored Jun 29, 2023
1 parent 9c85917 commit 8ee3ac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redbot/cogs/cleanup/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async def send_optional_notification(
"""
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:
num -= 1
if num == 1:
Expand Down

0 comments on commit 8ee3ac9

Please sign in to comment.