ShardManagerOptions
Signature
export interface ShardManagerOptions extends ShardDetailsProperties
11Methods
4Properties
info: APIGatewayBotInfo;Important data which is used by the manager to connect shards to the gateway.
spawnShardDelay?: number;Delay in milliseconds to wait before spawning next shard. OPTIMAL IS ABOVE 5100. YOU DON'T WANT TO HIT THE RATE LIMIT!!!
@default5300
totalShards?: number;Total amount of shards your bot uses. Useful for zero-downtime updates or resharding.
@default1
shardStart?: number;shardEnd?: number;debug?: boolean;wheter to send debug information to the console
presence?: (shardId: number) => GatewayPresenceUpdateData;Set a presence.
compress?: boolean;resharding?: { getInfo(): Promise<APIGatewayBotInfo>; interval: number; percentage: number;};reconnectTimeout?: number;connectionTimeout?: number;Methods
handlePayload(shardId: number, packet: GatewayDispatchPayload): unknown;The payload handlers for messages on the shard.
handleSendPayload?(shardId: number, payload: GatewaySendPayload): Awaitable<GatewaySendPayload | null | undefined | void>;onShardDisconnect?(data: ShardDisconnectData): Awaitable<unknown>;onShardReconnect?(data: ShardReconnectData): Awaitable<unknown>;