Skip to main content
Module

x/harmony/mod.ts>ShardManager

An easy to use Discord API Library for Deno.
Latest
class ShardManager
Re-export
import { ShardManager } from "https://deno.land/x/harmony@v2.9.0/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