Interface ShardManagerInstanceOptions

Hierarchy

  • Required<Pick<GatewayOptions, "autoReconnect" | "compress" | "connectionTimeout" | "firstShardID" | "getAllUsers" | "guildCreateTimeout" | "largeThreshold" | "lastShardID" | "maxReconnectAttempts" | "maxResumeAttempts" | "reconnectDelay" | "seedVoiceConnections" | "shardIDs" | "ws">>
    • ShardManagerInstanceOptions

Properties

autoReconnect: boolean

If dropped connections should be automatically reconnected.

Default Value

true

compress: boolean

If packets to and from Discord should be compressed.

Default Value

false

concurrency: number
connectionProperties: Required<undefined | {
    browser?: string;
    device?: string;
    os?: string;
}>
connectionTimeout: number

The maximum amount of time in milliseconds to wait for a connection to be established.

Default Value

30000

firstShardID: number

The ID of the first shard to run for this client. Mutually exclusive with shardIDs.

Default Value

0

getAllUsers: boolean

If the members of all guilds should be requested. Requires the GUILD_MEMBERS intent.

Default Value

false

guildCreateTimeout: number

The time in milliseconds after which the client will consider all guilds to have been received.

Default Value

2000

intents: number
largeThreshold: number

The threshold at which guilds are considered "large" (after which offline members will not be loaded).

Default Value

250

lastShardID: number

The ID of the last shard to run for this client. Mutually exclusive with shardIDs.

Default Value

maxShards - 1

maxReconnectAttempts: number

The maximum number of attempts to reconnect.

Default Value

Infinity

maxResumeAttempts: number

The maximum number of attempts to resume a lost connection.

Default Value

10

maxShards: number
presence: Required<UpdatePresenceOptions>
reconnectDelay: ReconnectDelayFunction

A function to calculate the delay between reconnect attempts.

Default Value

(lastDelay, attempts) => Math.pow(attempts + 1, 0.7) * 20000

seedVoiceConnections: boolean

If existing voice connections should be populated. This will disconnect connections from other sessions.

Default Value

false

shardIDs: number[]

An array of shard IDs to run for this client. Mutually exclusive with firstShardID & lastShardID.

Default Value

based on firstShardID & lastShardID

ws: ClientOptions

The options to pass to constructed websockets.