Create a gateway shard.
The bot's token.
The shard's ID.
The value to pass to num_shards
in the identify payload.
The URL being used to connect to the gateway.
Gateway shard options.
A callback to be used for logging events internally in the gateway shard.
Optional
logThisArg: anyA value to use as this
in the logCallback
.
Guilds that belong to the shard. This is populated as the shard is receiving GUILD_CREATE payloads, and is accurate after the shard is in a guilds ready state.
The shard's heartbeat ping in milliseconds.
Readonly
idThe shard's ID.
The last sequence number received.
Readonly
numThe value to pass to num_shards
in the identify payload.
Readonly
optionsOptions for the gateway shard.
The URL used for reconnecting and resuming sessions.
The shard's session ID.
The shard's state.
Readonly
systemThe system string used for logging.
Readonly
urlThe URL being used.
Guilds expected to receive a GUILD_CREATE from.
The WebSocket used by the shard.
Kills the shard.
The reason the shard is being killed. Defaults to "Manual kill"
.
A socket close code to send if the connection is still open. Defaults to 1000
.
Generated using TypeDoc
A gateway shard. Handles the low level ws communication with Discord.