mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Add Sharding Support!
This commit is contained in:
@@ -112,6 +112,9 @@ class WebSocketManager {
|
||||
this.reconnecting = false;
|
||||
const payload = this.client.options.ws;
|
||||
payload.token = this.client.token;
|
||||
if (this.client.options.shard_count > 0) {
|
||||
payload.shard = [this.client.options.shard_id, this.client.options.shard_count];
|
||||
}
|
||||
|
||||
this.send({
|
||||
op: Constants.OPCodes.IDENTIFY,
|
||||
|
||||
Reference in New Issue
Block a user