You are reading the documentation for the next version of discord.js. Documentation for v13/v14+ has been moved to old.discordjs.dev

IShardingStrategy

export declare interface IShardingStrategy
export declare interface IShardingStrategy
Strategies responsible for spawning, initializing connections, destroying shards, and relaying events
connect():Awaitable<void>
Initializes all the shards
destroy(options?):Awaitable<void>
Destroys all the shards
NameTypeOptionalDescription
optionsOmit<WebSocketShardDestroyOptions, 'recover'>YesNone
fetchStatus():Awaitable<Collection<number, WebSocketShardStatus>>
Fetches the status of all the shards
send(shardId, payload):Awaitable<void>
Sends a payload to a shard
NameTypeOptionalDescription
shardIdnumberNoNone
payloadGatewaySendPayloadNoNone
spawn(shardIds):Awaitable<void>
Spawns all the shards
NameTypeOptionalDescription
shardIdsnumber[]NoNone