Skip to main content

ShardCreateOptions

@discordeno/bot


Documentation / @discordeno/bot / ShardCreateOptions

Interface: ShardCreateOptions

Defined in: packages/gateway/dist/types/Shard.d.ts:113

Properties

connection

connection: ShardGatewayConfig

Defined in: packages/gateway/dist/types/Shard.d.ts:117

The connection details


events

events: ShardEvents

Defined in: packages/gateway/dist/types/Shard.d.ts:119

The event handlers for events on the shard.


id

id: number

Defined in: packages/gateway/dist/types/Shard.d.ts:115

The shard id


logger?

optional logger: Pick<{ debug: (...args) => void; error: (...args) => void; fatal: (...args) => void; info: (...args) => void; log: (level, ...args) => void; setDepth: (level) => void; setLevel: (level) => void; warn: (...args) => void; }, "debug" | "info" | "warn" | "error" | "fatal">

Defined in: packages/gateway/dist/types/Shard.d.ts:121

The logger for the shard


makePresence()?

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

Defined in: packages/gateway/dist/types/Shard.d.ts:127

Function to create the bot status to send on Identify requests

Returns

Promise<undefined | BotStatusUpdate>


requestIdentify()?

optional requestIdentify: () => Promise<void>

Defined in: packages/gateway/dist/types/Shard.d.ts:123

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

Returns

Promise<void>


shardIsReady()?

optional shardIsReady: () => Promise<void>

Defined in: packages/gateway/dist/types/Shard.d.ts:125

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

Returns

Promise<void>