Skip to main content

ShardGatewayConfig

Documentation


Documentation / @discordeno/gateway / ShardGatewayConfig

Interface: ShardGatewayConfig

Defined in: types.ts:28

Properties​

capabilities?​

optional capabilities?: number

Defined in: types.ts:85

Bitfield representing the capabilities of the client.

Default​

0

See​

GatewayCapabilities


compress​

compress: boolean

Defined in: types.ts:39

Whether to enable Payload compression.

Remarks​

This is incompatible with transportCompression.

Default​

false

See​

https://docs.discord.com/developers/events/gateway#payload-compression


intents​

intents: number

Defined in: types.ts:58

The calculated intent value of the events which the shard should receive.

Default​

0

properties​

properties: DiscordIdentifyConnectionProperties

Defined in: types.ts:60

Identify properties to use


token​

token: string

Defined in: types.ts:62

Bot token which is used to connect to Discord


totalShards​

totalShards: number

Defined in: types.ts:77

The total number of shards to connect to across the entire bot.

Default​

1

transportCompression​

transportCompression: TransportCompression | null

Defined in: types.ts:53

What Transport Compression should be used

Remarks​

This is incompatible with compress.

TransportCompression.zlib uses node:zlib Inflate to decompress, while TransportCompression.zstd uses node:zlib ZstdDecompress to decompress.

Default​

null

See​

https://docs.discord.com/developers/events/gateway#transport-compression


url​

url: string

Defined in: types.ts:67

The URL of the gateway which should be connected to.

Default​

"wss://gateway.discord.gg"

version​

version: number

Defined in: types.ts:72

The gateway version which should be used.

Default​

10