Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Commit

Permalink
add permission check to deleting spam messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jgayfer committed Oct 31, 2017
1 parent 6c9fcb5 commit a197c8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cogs/utils/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,7 @@ def check(message):

if cleanup:
await asyncio.sleep(constants.SPAM_DELAY)
await self.channel.purge(limit=999, check=check)
try:
await self.channel.purge(limit=999, check=check)
except:
pass

0 comments on commit a197c8b

Please sign in to comment.