mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
feat(ShardingManager): add options typings (#5583)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
23
typings/index.d.ts
vendored
23
typings/index.d.ts
vendored
@@ -1516,18 +1516,7 @@ declare module 'discord.js' {
|
||||
}
|
||||
|
||||
export class ShardingManager extends EventEmitter {
|
||||
constructor(
|
||||
file: string,
|
||||
options?: {
|
||||
totalShards?: number | 'auto';
|
||||
shardList?: number[] | 'auto';
|
||||
mode?: ShardingManagerMode;
|
||||
respawn?: boolean;
|
||||
shardArgs?: string[];
|
||||
token?: string;
|
||||
execArgv?: string[];
|
||||
},
|
||||
);
|
||||
constructor(file: string, options?: ShardingManagerOptions);
|
||||
private _performOnShards(method: string, args: any[]): Promise<any[]>;
|
||||
private _performOnShards(method: string, args: any[], shard: number): Promise<any>;
|
||||
|
||||
@@ -3510,6 +3499,16 @@ declare module 'discord.js' {
|
||||
|
||||
type ShardingManagerMode = 'process' | 'worker';
|
||||
|
||||
interface ShardingManagerOptions {
|
||||
totalShards?: number | 'auto';
|
||||
shardList?: number[] | 'auto';
|
||||
mode?: ShardingManagerMode;
|
||||
respawn?: boolean;
|
||||
shardArgs?: string[];
|
||||
token?: string;
|
||||
execArgv?: string[];
|
||||
}
|
||||
|
||||
type Snowflake = string;
|
||||
|
||||
interface SplitOptions {
|
||||
|
||||
Reference in New Issue
Block a user