Skip to main content

ShardCreateOptions

@discordeno/gatewayDocs


Documentation / @discordeno/gateway / ShardCreateOptions

Interface: ShardCreateOptions

Properties

connection

connection: ShardGatewayConfig

The connection details

Defined in

gateway/src/Shard.ts:775


events

events: ShardEvents

The event handlers for events on the shard.

Defined in

gateway/src/Shard.ts:777


id

id: number

The shard id

Defined in

gateway/src/Shard.ts:773


logger?

optional logger: Pick<object, "debug" | "info" | "warn" | "error" | "fatal">

The logger for the shard

Type declaration

debug()

debug: (...args) => void

Parameters

• ...args: any[]

Returns

void

error()

error: (...args) => void

Parameters

• ...args: any[]

Returns

void

fatal()

fatal: (...args) => void

Parameters

• ...args: any[]

Returns

void

info()

info: (...args) => void

Parameters

• ...args: any[]

Returns

void

log()

log: (level, ...args) => void

Parameters

level: LogLevels

• ...args: any[]

Returns

void

setDepth()

setDepth: (level) => void

Parameters

level: LogDepth

Returns

void

setLevel()

setLevel: (level) => void

Parameters

level: LogLevels

Returns

void

warn()

warn: (...args) => void

Parameters

• ...args: any[]

Returns

void

Defined in

gateway/src/Shard.ts:779


makePresence()?

optional makePresence: () => Promise<undefined | BotStatusUpdate>

Function to create the bot status to send on Identify requests

Returns

Promise<undefined | BotStatusUpdate>

Defined in

gateway/src/Shard.ts:785


requestIdentify()?

optional requestIdentify: () => Promise<void>

The handler to request a space to make an identify request.

Returns

Promise<void>

Defined in

gateway/src/Shard.ts:781


shardIsReady()?

optional shardIsReady: () => Promise<void>

The handler to alert the gateway manager that this shard has received a READY event.

Returns

Promise<void>

Defined in

gateway/src/Shard.ts:783