mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-21 05:34:41 +12:00
refactor(GuildAuditLogs): remove build (#7704)
This commit is contained in:
parent
85e531f22d
commit
cedd0536ba
3 changed files with 1 additions and 12 deletions
|
@ -733,7 +733,7 @@ class Guild extends AnonymousGuild {
|
|||
}
|
||||
|
||||
const data = await this.client.rest.get(Routes.guildAuditLog(this.id), { query });
|
||||
return GuildAuditLogs.build(this, data);
|
||||
return new GuildAuditLogs(this, data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -66,16 +66,6 @@ class GuildAuditLogs {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles possible promises for entry targets.
|
||||
* @returns {Promise<GuildAuditLogs>}
|
||||
*/
|
||||
static async build(...args) {
|
||||
const logs = new GuildAuditLogs(...args);
|
||||
await Promise.all(logs.entries.map(e => e.target));
|
||||
return logs;
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return Util.flatten(this);
|
||||
}
|
||||
|
|
1
packages/discord.js/typings/index.d.ts
vendored
1
packages/discord.js/typings/index.d.ts
vendored
|
@ -1131,7 +1131,6 @@ export class GuildAuditLogs<T extends GuildAuditLogsResolvable = null> {
|
|||
private integrations: Collection<Snowflake | string, Integration>;
|
||||
public entries: Collection<Snowflake, GuildAuditLogsEntry<T>>;
|
||||
public static Entry: typeof GuildAuditLogsEntry;
|
||||
public static build(...args: unknown[]): Promise<GuildAuditLogs>;
|
||||
public toJSON(): unknown;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue