Interface

ShardingManagerOptions

Properties

NameTypeDescription
execArgv?string[]
fetchGuildCount?() => Promise<number>Provide when totalShards: 'auto'. Should return the bot's guild count. Fluxer's /gateway/bot stubs shards: 1, so this is required for auto.
filestringAbsolute or relative path to the bot entry file (forked per process).
guildsPerShard?numberGuilds per shard for auto mode. @default 1500
identifyThrottler?IIdentifyThrottlerShared identify budget for all children on this host.
respawn?booleanRespawning dead children. @default true
shardArgs?string[]Args forwarded to child_process.fork.
shardCount?number | 'auto'Alias of totalShards (matches Client / ws vocabulary).
shardIds?number[]Alias of shardList.
shardList?number[]Explicit list of shard ids to spawn (defaults to 0..totalShards-1). Alias: shardIds.
shardsPerProcess?numberHow many gateway shards each child process owns. @default 1
spawnDelay?numberDelay between spawning successive child processes. @default 5_000
spawnTimeout?numberTimeout waiting for a child Ready IPC. @default 30_000
tokenstringBot token — forwarded to children via env (never logged).
totalShards?number | 'auto'Total shard count, or 'auto' (requires fetchGuildCount). Prefer an explicit number when you know your scale. Alias: shardCount.