Skip to main content
Extremely Popular
Go to Latest
interface ActivateResharderOptions
import { type ActivateResharderOptions } from "https://deno.land/x/discordeno@13.0.0-rc45/gateway/manager/resharder.ts";

Properties

optional
checkInterval: number

Interval in milliseconds of when to check whether it's time to reshard.

gatewayManager: GatewayManager

Gateway manager which the resharder should be bound to.

optional
percentage: number

Percentage at which resharding should occur.

optional
useOptimalLargeBotSharding: boolean

Whether the resharder should automatically switch to LARGE BOT SHARDING when the bot is above 100K servers.

Methods

getGatewayBot(): Promise<GetGatewayBot>

Function which can be used to fetch the current gateway information of the bot. This function is mainly used by the reshard checker.

tellWorkerToPrepare(
gatewayManager: GatewayManager,
workerId: number,
shardId: number,
bucketId: number,
): Promise<void>

Function which is used to tell a Worker that it should identify a resharder Shard to the gateway and wait for further instructions. The worker should NOT process any events coming from this Shard.