Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/harmony/src/client/mod.ts>ShardManager

An easy to use Discord API Library for Deno.
Go to Latest
class ShardManager
Re-export
import { ShardManager } from "https://deno.land/x/harmony@v2.6.0/src/client/mod.ts";

Constructors

new
ShardManager(client: Client)

Properties

optional
cachedShardCount: number
client: Client
list: Collection<string, Gateway>
readonly
ping: number

Get average ping from all Shards

queue: CallableFunction[]
queueProcessing: boolean
readonly
rest: RESTManager

Methods

private
processQueue(): Promise<void>
connect(): Promise<ShardManager>

Launches all Shards

debug(msg: string): void
destroy(): void
enqueueIdentify(fn: CallableFunction): ShardManager
get(id: number): Gateway | undefined
getShardCount(): Promise<number>
launch(id: number, waitFor?: GatewayEvents.Ready | "hello"): Promise<ShardManager>

Launches a new Shard