We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d19426 commit 73f2ef9Copy full SHA for 73f2ef9
packages/discord.js/src/client/Client.js
@@ -58,7 +58,8 @@ class Client extends BaseClient {
58
const defaults = Options.createDefault();
59
60
if (this.options.ws.shardIds === defaults.ws.shardIds && 'SHARDS' in data) {
61
- this.options.ws.shardIds = JSON.parse(data.SHARDS);
+ const shards = JSON.parse(data.SHARDS);
62
+ this.options.ws.shardIds = Array.isArray(shards) ? shards : [shards];
63
}
64
65
if (this.options.ws.shardCount === defaults.ws.shardCount && 'SHARD_COUNT' in data) {
0 commit comments