UNPKG

status-sharding

Version:

Welcome to Status Sharding! This package is designed to provide an efficient and flexible solution for sharding Discord bots, allowing you to scale your bot across multiple processes or workers.

17 lines (16 loc) 867 B
import { Worker as WorkerThread } from 'worker_threads'; import type { RefShardingCoreClient } from 'src/core/coreClient'; import { ClusterClientData, PackageType } from '../types'; import { ClientRefType } from 'src/core/clusterClient'; import { ChildProcess } from 'child_process'; export declare function getInfo(): ClusterClientData; export declare function getDiscordVersion(type: PackageType): Promise<{ major: number; minor: number; patch: number; raw: any; }>; export declare function detectLibraryFromClient(client: any): PackageType | null; export declare function isCoreClient(client: ClientRefType): client is RefShardingCoreClient; export declare function isWorkerThread(process: ChildProcess | WorkerThread): process is WorkerThread; export declare function isChildProcess(process: ChildProcess | WorkerThread): process is ChildProcess;