Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audit_logs not fetching more than 100 logs #2445

Open
3 tasks done
champymarty opened this issue May 5, 2024 · 4 comments
Open
3 tasks done

audit_logs not fetching more than 100 logs #2445

champymarty opened this issue May 5, 2024 · 4 comments
Labels
unconfirmed bug A bug report that needs triaging

Comments

@champymarty
Copy link

champymarty commented May 5, 2024

Summary

audit_logs not fetching more than 100 logs

Reproduction Steps

async for entry in guild.audit_logs(limit=None, after=discord.Object(id=0), action=discord.AuditLogAction.member_role_update):
...

Minimal Reproducible Code

async for entry in guild.audit_logs(limit=None, after=discord.Object(id=0),                                action=discord.AuditLogAction.member_role_update):
  ...

Expected Results

Fetch all the audit logs in batches:
fetch 1-100, 101-202, ... etc
but in the iterator, we only see them coming one at a time
without to have to do multiple calls

Actual Results

Only fetch the 100 lastest audit logs

Intents

intents.members = True     intents.guilds = True     intents.moderation = True     intents.voice_states = True

System Information

  • Python v3.11.1-final
  • py-cord v2.5.1-final
  • aiohttp v3.8.6
  • system info: Windows 10 10.0.22631

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

The problem migh have been introduced by the after param being fixed:
Fixed AuditLogIterator not respecting the after parameter. (#2295)

@champymarty champymarty added the unconfirmed bug A bug report that needs triaging label May 5, 2024
@champymarty
Copy link
Author

champymarty commented May 5, 2024

Here is the fix they did on discord.py on that issue:
http
s://github.com/Rapptz/discord.py/pull/9269/files

@NeloBlivion
Copy link
Member

NeloBlivion commented May 5, 2024

Can't replicate if you're using limit=None then don't specify after, otherwise will look into fixing

@champymarty
Copy link
Author

champymarty commented May 5, 2024

I need both limit=None and the after param for my use case
I fetch all the missed audit logs events from a last_process_audit_log_id, so limit needs to be None and after specified

@champymarty
Copy link
Author

Do you think this will be pick up ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed bug A bug report that needs triaging
Projects
None yet
Development

No branches or pull requests

2 participants