Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
fix: properly start custom shard count
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi committed Feb 13, 2024
1 parent 11f3c05 commit 9bc2d46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Structures/NezuGateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class NezuGateway extends EventEmitter {

this.ws.on(WebSocketShardEvents.Debug, ({ message }) => this.logger.debug(message));

if (gatewayGuildPerShard) {
if (gatewayGuildPerShard && gatewayShardCount === null) {
const { shards } = await this.ws.fetchGatewayInformation(true);
this.ws.options.shardCount = Number(Math.ceil((shards * (1_000 / Number(gatewayGuildPerShard))) / 1));
}
Expand Down

0 comments on commit 9bc2d46

Please sign in to comment.