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

Guild.fetchAuditLogs corresponding API endpoint does not accept the documented "after" parameter #3141

Closed
1 task
monbrey opened this issue Mar 11, 2019 · 1 comment · Fixed by #3142
Closed
1 task

Comments

@monbrey
Copy link
Member

monbrey commented Mar 11, 2019

Please describe the problem you are having in as much detail as possible:
Guild.fetchAuditLogs() is documented as and coded to accept options.after, however the API endpoint does not accept this parameter.
https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=fetchAuditLogs
https://github.com/discordjs/discord.js/blob/master/src/structures/Guild.js#L569
https://discordapp.com/developers/docs/resources/audit-log#get-guild-audit-log-query-string-parameters

Include a reproducible code sample here, if possible:

client.guilds.get("guild_id_here").fetchAuditLogs({limit: "2"})
// Will correctly return two logs. Get the Snowflake of the older log
client.guilds.get("same_guild_id_here").fetchAuditLogs({after: "older_audit_log_id"})
// Expected behaviour would be to return 1 or 2 logs, depending on if `after` was inclusive. Since it doesnt exist at all, it returns the default 50

Further details:

  • discord.js version: Tested on stable by me, master by someone else
  • Node.js version: v10.15.0
  • Operating system: Windows 10
  • Priority this issue should have – please be realistic and elaborate if possible: Fixing - low. Changing the documentation to not be misleading - maybe medium since its easy to do, will probably PR it myself
  • I have also tested the issue on latest master, commit hash: I haven't, but the offending code is still there
@monbrey
Copy link
Member Author

monbrey commented Mar 11, 2019

#3142

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants