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
Please describe the problem you are having in as much detail as possible:
Guild.fetchAuditLogs()
is documented as and coded to acceptoptions.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-parametersInclude a reproducible code sample here, if possible:
Further details: