dblapi.js
Advanced tools
Comparing version 2.3.1 to 2.4.0
{ | ||
"name": "dblapi.js", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"description": "An official module for interacting with the top.gg API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -149,5 +149,9 @@ const EventEmitter = require('events'); | ||
} else { | ||
data.server_count = this.client.guilds.size; | ||
data.server_count = this.client.guilds.size || this.client.guilds.cache.size; | ||
if (this.client.shard && this.client.shard.count) { | ||
data.shard_id = this.client.shard.id; | ||
if (this.client.shard.ids && this.client.shard.ids.length === 1 && this.client.shard.count > 1) { | ||
data.shard_id = this.client.shard.ids[0]; | ||
} else { | ||
data.shard_id = this.client.shard.id; | ||
} | ||
data.shard_count = this.client.shard.count; | ||
@@ -154,0 +158,0 @@ } else if (this.client.shards && this.client.shards.size !== 1) { |
@@ -8,2 +8,3 @@ export = DBLAPI; | ||
public webhook?: DBLWebhook; | ||
public postStats(serverCount: number, shardId?: number, shardCount?: number): Promise<object> | ||
@@ -10,0 +11,0 @@ public getStats(id: string): Promise<DBLAPI.BotStats> |
Sorry, the diff of this file is not supported yet
580
33713