import { PackageType, ValidIfSerializable } from '../types'; /** Sharding utils. */ export declare class ShardingUtils { /** Generates a nonce. */ static generateNonce(): string; /** Chunks an array into smaller arrays. */ static chunkArray(array: T[], chunkSize: number, equalize?: boolean): T[][]; /** Delays for a certain amount of time. */ static delayFor(ms: number): Promise; /** Checks if a value is serializable. */ static isSerializable(value: T): value is T & ValidIfSerializable; /** Removes all non-existing values from an array. */ static removeNonExisting(array: (T | undefined)[]): T[] | undefined; /** Makes an error plain. */ static makePlainError(err: Error): { name: string; message: string; stack: string; }; /** Merges two objects. */ static mergeObjects(main: Partial, toMerge: Partial): T; /** Gets the shard id for a guild id. */ static shardIdForGuildId(guildId: string, totalShards: number): number; /** Gets the cluster id for a shard id. */ static clusterIdForShardId(shardId: string, totalShards: number, totalClusters: number): number; /** Gets the cluster id for a guild id. */ static clusterIdForGuildId(guildId: string, totalShards: number, totalClusters: number): number; /** Gets the cluster id for a shard id. */ static getRecommendedShards(token: string, guildsPerShard?: number, options?: { http: { api: string; version: string; }; }): Promise; static parseInput(input: string | T, context?: unknown, packageType?: PackageType | null, ...args: string[]): string; static boolProp(input: unknown, key: T): T | `not ${T}`; static relativeTime(time?: number): string; }