Skip to main content

ShardEvents

@discordeno/gateway


Documentation / @discordeno/gateway / ShardEvents

Interface: ShardEvents

Defined in: gateway/src/types.ts:124

Properties

connected()?

optional connected: (shard) => unknown

Defined in: gateway/src/types.ts:142

The shard is connected with Discord's gateway.

Parameters

shard

DiscordenoShard

Returns

unknown


connecting()?

optional connecting: (shard) => unknown

Defined in: gateway/src/types.ts:140

The shard started to connect to Discord's gateway.

Parameters

shard

DiscordenoShard

Returns

unknown


disconnected()?

optional disconnected: (shard) => unknown

Defined in: gateway/src/types.ts:144

The shard has been disconnected from Discord's gateway.

Parameters

shard

DiscordenoShard

Returns

unknown


heartbeat()?

optional heartbeat: (shard) => unknown

Defined in: gateway/src/types.ts:126

A heartbeat has been send.

Parameters

shard

DiscordenoShard

Returns

unknown


heartbeatAck()?

optional heartbeatAck: (shard) => unknown

Defined in: gateway/src/types.ts:128

A heartbeat ACK was received.

Parameters

shard

DiscordenoShard

Returns

unknown


hello()?

optional hello: (shard) => unknown

Defined in: gateway/src/types.ts:130

Shard has received a Hello payload.

Parameters

shard

DiscordenoShard

Returns

unknown


identified()?

optional identified: (shard) => unknown

Defined in: gateway/src/types.ts:148

The shard has successfully been identified itself with Discord.

Parameters

shard

DiscordenoShard

Returns

unknown


identifying()?

optional identifying: (shard) => unknown

Defined in: gateway/src/types.ts:146

The shard has started to identify itself to Discord.

Parameters

shard

DiscordenoShard

Returns

unknown


invalidSession()?

optional invalidSession: (shard, resumable) => unknown

Defined in: gateway/src/types.ts:132

The Shards session has been invalidated.

Parameters

shard

DiscordenoShard

resumable

boolean

Returns

unknown


message()?

optional message: (shard, payload) => unknown

Defined in: gateway/src/types.ts:150

The shard has received a message from Discord.

Parameters

shard

DiscordenoShard

payload
d

unknown

op

number

s

null | number

t

null | GatewayEventNames

Returns

unknown


requestedReconnect()?

optional requestedReconnect: (shard) => unknown

Defined in: gateway/src/types.ts:138

Discord has requested the Shard to reconnect.

Parameters

shard

DiscordenoShard

Returns

unknown


resumed()?

optional resumed: (shard) => unknown

Defined in: gateway/src/types.ts:136

The shard has successfully resumed an old session.

Parameters

shard

DiscordenoShard

Returns

unknown


resuming()?

optional resuming: (shard) => unknown

Defined in: gateway/src/types.ts:134

The shard has started a resume action.

Parameters

shard

DiscordenoShard

Returns

unknown