mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
fix(GuildAuditLogs): Cache guild scheduled events (#7951)
This commit is contained in:
@@ -55,6 +55,17 @@ class GuildAuditLogs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cached {@link GuildScheduledEvent}s.
|
||||||
|
* @type {Collection<Snowflake, GuildScheduledEvent>}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
this.guildScheduledEvents = data.guild_scheduled_events.reduce(
|
||||||
|
(guildScheduledEvents, guildScheduledEvent) =>
|
||||||
|
guildScheduledEvents.set(guildScheduledEvent.id, guild.scheduledEvents._add(guildScheduledEvent)),
|
||||||
|
new Collection(),
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The entries for this guild's audit logs
|
* The entries for this guild's audit logs
|
||||||
* @type {Collection<Snowflake, GuildAuditLogsEntry>}
|
* @type {Collection<Snowflake, GuildAuditLogsEntry>}
|
||||||
|
|||||||
1
packages/discord.js/typings/index.d.ts
vendored
1
packages/discord.js/typings/index.d.ts
vendored
@@ -1155,6 +1155,7 @@ export class GuildAuditLogs<T extends GuildAuditLogsResolvable = null> {
|
|||||||
private constructor(guild: Guild, data: RawGuildAuditLogData);
|
private constructor(guild: Guild, data: RawGuildAuditLogData);
|
||||||
private webhooks: Collection<Snowflake, Webhook>;
|
private webhooks: Collection<Snowflake, Webhook>;
|
||||||
private integrations: Collection<Snowflake | string, Integration>;
|
private integrations: Collection<Snowflake | string, Integration>;
|
||||||
|
private guildScheduledEvents: Collection<Snowflake, GuildScheduledEvent>;
|
||||||
public entries: Collection<Snowflake, GuildAuditLogsEntry<T>>;
|
public entries: Collection<Snowflake, GuildAuditLogsEntry<T>>;
|
||||||
public static Entry: typeof GuildAuditLogsEntry;
|
public static Entry: typeof GuildAuditLogsEntry;
|
||||||
public toJSON(): unknown;
|
public toJSON(): unknown;
|
||||||
|
|||||||
Reference in New Issue
Block a user