import { type CreateShard } from "https://dotland.deno.dev/x/discordeno@18.0.1/plugins/fileloader/deps.ts";
Properties
This function communicates with the management process, in order to know whether its free to identify. When this function resolves, this means that the shard is allowed to send an identify payload to discord.
Calculate the amount of requests which can safely be made per rate limit interval, before the gateway gets disconnected due to an exceeded rate limit.
Connect the shard with the gateway and start heartbeating. This will not identify the shard to the gateway.
Identify the shard to the gateway. If not connected, this will also connect the shard to the gateway.
The maximum of requests which can be send to discord per rate limit tick. Typically this value should not be changed.
Shutdown the shard. Forcefully disconnect the shard from Discord. The shard may not attempt to reconnect with Discord.
Cache for pending gateway requests which should have been send while the gateway went offline.
This is used to resolve internal waiting states. Mapped by SelectedEvents => ResolveFunction
Methods
Function which can be overwritten in order to get the shards presence.