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.
OptionallogThisArg: 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.
ReadonlyidThe shard's ID.
The last sequence number received.
ReadonlynumThe value to pass to num_shards in the identify payload.
ReadonlyoptionsOptions for the gateway shard.
The URL used for reconnecting and resuming sessions.
The shard's session ID.
The shard's state.
ReadonlysystemThe system string used for logging.
ReadonlyurlThe URL being used.
Guilds expected to receive a GUILD_CREATE from.
The WebSocket used by the shard.
Gets the shard's ping.
The node's ping in milliseconds.
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.
Sends a payload to the gateway.
Spawns the shard.
A gateway shard. Handles the low level ws communication with Discord.