Skip to content

audit_logs not fetching more than 100 logs #2445

Description

@champymarty

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    unconfirmed bugA bug report that needs triaging

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions