Skip to main content

ShardCreateOptions

@discordeno/botDocs


Documentation / @discordeno/bot / ShardCreateOptions

Interface: ShardCreateOptions

Properties

connection

connection: ShardGatewayConfig

The connection details

Defined in

packages/gateway/dist/types/Shard.d.ts:110


events

events: ShardEvents

The event handlers for events on the shard.

Defined in

packages/gateway/dist/types/Shard.d.ts:112


id

id: number

The shard id

Defined in

packages/gateway/dist/types/Shard.d.ts:108


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

packages/gateway/dist/types/Shard.d.ts:114


makePresence()?

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

Function to create the bot status to send on Identify requests

Returns

Promise<undefined | BotStatusUpdate>

Defined in

packages/gateway/dist/types/Shard.d.ts:120


requestIdentify()?

optional requestIdentify: () => Promise<void>

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

Returns

Promise<void>

Defined in

packages/gateway/dist/types/Shard.d.ts:116


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

packages/gateway/dist/types/Shard.d.ts:118