Skip to content

Commit 73f2ef9

Browse files
authored
fix: all shards spawning on shard 0 with sharding manager (#10814)
1 parent 4d19426 commit 73f2ef9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/discord.js/src/client/Client.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ class Client extends BaseClient {
5858
const defaults = Options.createDefault();
5959

6060
if (this.options.ws.shardIds === defaults.ws.shardIds && 'SHARDS' in data) {
61-
this.options.ws.shardIds = JSON.parse(data.SHARDS);
61+
const shards = JSON.parse(data.SHARDS);
62+
this.options.ws.shardIds = Array.isArray(shards) ? shards : [shards];
6263
}
6364

6465
if (this.options.ws.shardCount === defaults.ws.shardCount && 'SHARD_COUNT' in data) {

0 commit comments

Comments
 (0)