[Cleanup] use message_filter() over check() param (#2180)

Cleanup's helper method to collect messages to delete was incorrectly filtering by check rather than message_filter, causing delete_after to be ignored.
This commit is contained in:
zephyrkul 2018-10-06 17:19:56 -06:00 committed by Toby Harradine
parent 71eddc89ea
commit 046e98565e

View File

@ -94,7 +94,7 @@ class Cleanup(commands.Cog):
):
if message.created_at < two_weeks_ago:
break
if check(message):
if message_filter(message):
collected.append(message)
if number and number <= len(collected):
break