Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/discordjs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default class DiscordAnalytics {
*/
public async trackInteractions(interaction: any, interactionNameResolver?: (interaction: any) => string) {
if (this._debug) console.log("[DISCORDANALYTICS] trackInteractions() triggered")
if (!this._isReady) throw new Error(ErrorCodes.INSTANCE_NOT_INITIALIZED)
if (!this._isReady) return console.error(ErrorCodes.INSTANCE_NOT_INITIALIZED)

let guilds: { locale: Locale, number: number }[] = []
this._client.guilds.cache.map((current: any) => guilds.find((x) => x.locale === current.preferredLocale) ?
Expand Down Expand Up @@ -273,4 +273,4 @@ export default class DiscordAnalytics {
this._client.on("guildCreate", (guild: any) => this.trackGuilds(guild, "create"))
this._client.on("guildDelete", (guild: any) => this.trackGuilds(guild, "delete"))
}
}
}
Loading