mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
parent
b557b437a3
commit
a175bdc1c7
@ -71,11 +71,11 @@ class Cleanup:
|
|||||||
to_delete = []
|
to_delete = []
|
||||||
too_old = False
|
too_old = False
|
||||||
|
|
||||||
while not too_old and len(to_delete) - 1 < number:
|
while not too_old and len(to_delete) < number:
|
||||||
message = None
|
message = None
|
||||||
async for message in channel.history(limit=limit, before=before, after=after):
|
async for message in channel.history(limit=limit, before=before, after=after):
|
||||||
if (
|
if (
|
||||||
(not number or len(to_delete) - 1 < number)
|
(not number or len(to_delete) < number)
|
||||||
and check(message)
|
and check(message)
|
||||||
and (ctx.message.created_at - message.created_at).days < 14
|
and (ctx.message.created_at - message.created_at).days < 14
|
||||||
and (delete_pinned or not message.pinned)
|
and (delete_pinned or not message.pinned)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user