cleanup(Guild): removed fetchAuditLogs' "after" option (#3142)

* Removed code and documentation for Guild.fetchAuditLogs "after" option

* Also removed the option from typings
This commit is contained in:
Ryan Munro
2019-03-13 05:14:32 +11:00
committed by SpaceEEC
parent 1673b6f8f5
commit df1889ab49
2 changed files with 0 additions and 4 deletions

View File

@@ -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,

1
typings/index.d.ts vendored
View File

@@ -1744,7 +1744,6 @@ declare module 'discord.js' {
interface GuildAuditLogsFetchOptions {
before?: Snowflake | GuildAuditLogsEntry;
after?: Snowflake | GuildAuditLogsEntry;
limit?: number;
user?: UserResolvable;
type?: string | number;