Skip to main content

ShardCreateOptions

@discordeno/gateway


Documentation / @discordeno/gateway / ShardCreateOptions

Interface: ShardCreateOptions

Defined in: gateway/src/Shard.ts:802

Properties

connection

connection: ShardGatewayConfig

Defined in: gateway/src/Shard.ts:806

The connection details


events

events: ShardEvents

Defined in: gateway/src/Shard.ts:808

The event handlers for events on the shard.


id

id: number

Defined in: gateway/src/Shard.ts:804

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: gateway/src/Shard.ts:810

The logger for the shard


makePresence()?

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

Defined in: gateway/src/Shard.ts:816

Function to create the bot status to send on Identify requests

Returns

Promise<undefined | BotStatusUpdate>


requestIdentify()?

optional requestIdentify: () => Promise<void>

Defined in: gateway/src/Shard.ts:812

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

Returns

Promise<void>


shardIsReady()?

optional shardIsReady: () => Promise<void>

Defined in: gateway/src/Shard.ts:814

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

Returns

Promise<void>