feat(FetchRecommendedShardsOptions): account for large bot sharding (#6184)

Co-authored-by: Justin <justinleeong@gmail.com>
This commit is contained in:
Scott Bucher
2021-07-28 21:52:51 -04:00
committed by GitHub
parent 4f1f32f2a5
commit 19b242ac10
2 changed files with 15 additions and 4 deletions

7
typings/index.d.ts vendored
View File

@@ -1535,6 +1535,11 @@ export class ShardingManager extends EventEmitter {
public once(event: 'shardCreate', listener: (shard: Shard) => Awaited<void>): this;
}
export interface FetchRecommendedShardsOptions {
guildsPerShard?: number;
multipleOf?: number;
}
export class SnowflakeUtil extends null {
private constructor();
public static deconstruct(snowflake: Snowflake): DeconstructedSnowflake;
@@ -1795,7 +1800,7 @@ export class Util extends null {
public static escapeStrikethrough(text: string): string;
public static escapeSpoiler(text: string): string;
public static cleanCodeBlockContent(text: string): string;
public static fetchRecommendedShards(token: string, guildsPerShard?: number): Promise<number>;
public static fetchRecommendedShards(token: string, options?: FetchRecommendedShardsOptions): Promise<number>;
public static flatten(obj: unknown, ...props: Record<string, boolean | string>[]): unknown;
public static idToBinary(num: Snowflake): string;
public static makeError(obj: MakeErrorOptions): Error;