From df1889ab4902416de2bf6b3c144d55e35dbf116f Mon Sep 17 00:00:00 2001 From: Ryan Munro Date: Wed, 13 Mar 2019 05:14:32 +1100 Subject: [PATCH] cleanup(Guild): removed fetchAuditLogs' "after" option (#3142) * Removed code and documentation for Guild.fetchAuditLogs "after" option * Also removed the option from typings --- src/structures/Guild.js | 3 --- typings/index.d.ts | 1 - 2 files changed, 4 deletions(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index f99627a4c..9c44b1b8c 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -566,7 +566,6 @@ class Guild extends Base { * Fetches audit logs for this guild. * @param {Object} [options={}] Options for fetching audit logs * @param {Snowflake|GuildAuditLogsEntry} [options.before] Limit to entries from before specified entry - * @param {Snowflake|GuildAuditLogsEntry} [options.after] Limit to entries from after specified entry * @param {number} [options.limit] Limit number of entries * @param {UserResolvable} [options.user] Only show entries involving this user * @param {AuditLogAction|number} [options.type] Only show entries involving this action type @@ -579,12 +578,10 @@ class Guild extends Base { */ fetchAuditLogs(options = {}) { if (options.before && options.before instanceof GuildAuditLogs.Entry) options.before = options.before.id; - if (options.after && options.after instanceof GuildAuditLogs.Entry) options.after = options.after.id; if (typeof options.type === 'string') options.type = GuildAuditLogs.Actions[options.type]; return this.client.api.guilds(this.id)['audit-logs'].get({ query: { before: options.before, - after: options.after, limit: options.limit, user_id: this.client.users.resolveID(options.user), action_type: options.type, diff --git a/typings/index.d.ts b/typings/index.d.ts index c1dfb86b0..3f9f222af 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1744,7 +1744,6 @@ declare module 'discord.js' { interface GuildAuditLogsFetchOptions { before?: Snowflake | GuildAuditLogsEntry; - after?: Snowflake | GuildAuditLogsEntry; limit?: number; user?: UserResolvable; type?: string | number;