Skip to main content

ShardState

@discordeno/gateway


Documentation / @discordeno/gateway / ShardState

Enumeration: ShardState

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

Enumeration Members

Connected

Connected: 0

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

Shard is fully connected to the gateway and receiving events from Discord.


Connecting

Connecting: 1

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

Shard started to connect to the gateway. This is only used if the shard is not currently trying to identify or resume.


Disconnected

Disconnected: 2

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

Shard got disconnected and reconnection actions have been started.


Identifying

Identifying: 4

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

Shard is trying to identify with the gateway to create a new session.


Offline

Offline: 6

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

Shard got shut down studied or due to a not (self) fixable error and may not attempt to reconnect on its own.


Resuming

Resuming: 5

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

Shard is trying to resume a session with the gateway.


Unidentified

Unidentified: 3

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

The shard is connected to the gateway but only heartbeating. At this state the shard has not been identified with discord.