Skip to content

Guild locales stats are broken since v2.6.0 #227

@Nonolanlan1007

Description

@Nonolanlan1007

Before:

this._client.guilds.cache.map((current: any) => guilds.find((x) => x.locale === current.preferredLocale) ?
  ++guilds.find((x) => x.locale === current.preferredLocale)!.number :
  guilds.push({ locale: current.preferredLocale, number: 1 }));

After:

this.updateOrInsert(
  this.stats_data.guildsLocales,
  (x) => x.locale === interaction.guild?.preferredLocale,
  (x) => x.number++,
  () => ({ locale: interaction.guild?.preferredLocale, number: 1 })
);

Metadata

Metadata

Labels

bugSomething isn't workingreleased

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions