mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
refactor(WebSocketManager): passing in strategy (#9122)
* refactor(WebSocketManager): passing in strategy * chore: update tests * chore: requested nits --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import process from 'node:process';
|
||||
import { Collection } from '@discordjs/collection';
|
||||
import { lazy } from '@discordjs/util';
|
||||
import { APIVersion, GatewayOpcodes } from 'discord-api-types/v10';
|
||||
import { SimpleShardingStrategy } from '../strategies/sharding/SimpleShardingStrategy.js';
|
||||
import type { SessionInfo, OptionalWebSocketManagerOptions } from '../ws/WebSocketManager.js';
|
||||
import type { SendRateLimitState } from '../ws/WebSocketShard.js';
|
||||
|
||||
@@ -27,6 +28,7 @@ const getDefaultSessionStore = lazy(() => new Collection<number, SessionInfo | n
|
||||
* Default options used by the manager
|
||||
*/
|
||||
export const DefaultWebSocketManagerOptions = {
|
||||
buildStrategy: (manager) => new SimpleShardingStrategy(manager),
|
||||
shardCount: null,
|
||||
shardIds: null,
|
||||
largeThreshold: null,
|
||||
|
||||
Reference in New Issue
Block a user