Closed champymarty closed 3 months ago
In the mean time I just did:
entries = await guild.audit_logs(limit=None, after=object_id,
oldest_first=True, action=discord.AuditLogAction.member_role_update).flatten()
entries.sort(key=lambda val: val.created_at)
Might be a breaking change because oldest_first doesn't exist on the API, will follow spec instead
Approved, do it
There is also a problem where the audit_log will fetch so much more logs than required. This is cause when there is more than 100 logs to fetch, the iterator does not execute the logs in the right orders. It can only appear when more than 100 logs, becuase the iterator fetch logs in batch of max 100. For exemple there is 134 logs to fetch but it will fetch 3600 logs... That can be a big problem for performance and rate limits.
I put more details when I prosented the problem in the help server: https://discord.com/channels/881207955029110855/1132206148309749830/1208967662663897108
Summary
When trying to get oldest_first, it returns newest firsts
Reproduction Steps
I am trying to get the oldest_first in the audit logs:
But it is returning the most recent first ...
Minimal Reproducible Code
Expected Results
Actual Results
Intents
moderation, members, guilds
System Information
Checklist
Additional Context
No response