@discordanalytics/oceanic 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +7 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -71,8 +71,14 @@ class DiscordAnalytics extends core_1.AnalyticsBase {
71
71
  this.debug('[DISCORDANALYTICS] Sending stats...');
72
72
  const guildCount = this._client.guilds.toArray().length;
73
73
  const userCount = this._client.guilds.reduce((a, g) => a + (g.memberCount || 0), 0);
74
+ const userInstallCount = this._client.application.approximateUserInstallCount;
74
75
  const guildMembers = this._client.guilds.map((guild) => guild.memberCount);
75
- await this.sendStats(this._client.user.id, guildCount, userCount, guildMembers);
76
+ let guildLocales = [];
77
+ this._client.guilds.map((current) => guildLocales.find((x) => x.locale === current.preferredLocale) ?
78
+ ++guildLocales.find((x) => x.locale === current.preferredLocale).number :
79
+ guildLocales.push({ locale: current.preferredLocale, number: 1 }));
80
+ this.stats_data.guildsLocales = guildLocales;
81
+ await this.sendStats(this._client.user.id, guildCount, userCount, userInstallCount, guildMembers);
76
82
  }, fast_mode ? 30000 : 300000);
77
83
  }
78
84
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@discordanalytics/oceanic",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Oceanic package for working with Discord Analytics",
5
5
  "main": "dist/index.js",
6
6
  "author": "Discord Analytics",
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@types/node-fetch": "^2.6.13",
18
18
  "node-fetch": "^2.7.0",
19
- "@discordanalytics/core": "2.7.0"
19
+ "@discordanalytics/core": "2.8.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "oceanic.js": "^1.12.0",