Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Options

Options for the sharding manager

Hierarchy

  • Options

Index

Properties

BotWorker?: typeof BaseClusterWorker

Your BotWorker class (must extend BaseClusterWorker)

broadcastAdmiralEvents?: boolean

Whether to broadcast Admiral events (e.g. when a cluster is ready) Note to avoid using Admiral event names when this is enabled

defaultvalue

true

clientOptions?: ClientOptions

Options to pass to the Eris client constructor. Intents default to all non-privileged intents.

clusterTimeout?: number

How long between starting clusters

defaultvalue

5e3

clusters?: number | "auto"

Number of clusters

defaultvalue

"auto"

customClient?: typeof Client

Extended eris client class (should extend Eris.Client)

fetchTimeout?: number

How long to wait in ms before giving up on a fetch (includes eval functions and commands)

defaultvalue

10e3

firstShardID?: number

First shard ID to use on this instance of eris-fleet

guildsPerShard?: number | "auto"

Guilds per shard. "auto" uses the gateway's recommended shard count.

defaultvalue

"auto"

killTimeout?: number

Amount of time to wait in ms before doing a forced shutdown during shutdowns

defaultvalue

10e3

lastShardID?: number

Last shard ID to use on this instance of eris-fleet

lessLogging?: boolean

Option to have less logging show up

defaultvalue

false

loadCodeImmediately?: boolean

Whether to load your cluster class as soon as possible or wait until Eris's ready event. If you use this, your bot file must listen for the Eris ready event before doing anything which requires all shards to be connected. Also note that this will allow or your BotWorker to listen for events already being listened for in the old cluster during a soft restart. Be careful to avoid responding to an event twice.

defaultvalue

false

maxConcurrencyOverride?: number

Override the max_concurrency value sent from Discord (useful if using eris-fleet across machines). Set to 1 to disable concurrency.

beta
maxRestarts?: number

Maximum amount of restarts of a worker before giving up. -1 is infinite.

defaultvalue

5

nodeArgs?: string[]

Node arguments to pass to the clusters

objectLogging?: boolean

Whether to split the source in to an Object

defaultvalue

false

see

ObjectLog See for the object which is given in the logging event if this option is enabled

overrideConsole?: boolean

Whether to override console.log, console.debug, console.warn, and console.error in clusters and services

defaultvalue

true

path?: string

Absolute path to the js file

serviceTimeout?: number

How long to wait for a service to start

defaultvalue

0

services?: ServiceCreator[]

Services to start by name and path

shards?: number | "auto"

Number of shards

defaultvalue

"auto"

shutdownTogether?: boolean

Whether to shutdown shutdown services and clusters together whenever possible

defaultvalue

false

startServicesTogether?: boolean

Whether to start services together or not.

defaultvalue

false

startingStatus?: StartingStatus

Custom starting status

statsInterval?: number | "disable"

How often to update the stats after all clusters are spawned (set to "disable" to disable automated stats)

defaultvalue

60e3

timeout?: number

How long to wait for shards to connect to discord

deprecated

Use the connectionTimeout property of Options.clientOptions

token: string

Bot token

useCentralRequestHandler?: boolean

Whether to use a central request handler. The central request handler routes Eris requests to the Discord API through a single instance of the Eris RequestHandler. This helps prevent 429 errors from the Discord API by using a single rate limiter pool.

defaultvalue

false

whatToLog?: { blacklist?: LoggingOptions[]; whitelist?: LoggingOptions[] }

Allows for more logging customization (overrides generic lessLogging option)

see

LoggingOptions See for available options

example
const options = {
// Your other options
whatToLog: {
// This will only log when the admiral starts, when clusters are ready, and when services are ready.
whitelist: ['admiral_start', 'cluster_ready', 'service_ready']
}
};

Type declaration

Generated using TypeDoc