This repository has been archived by the owner on Dec 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
83 lines (73 loc) · 2.19 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import Eris from "eris";
interface OPTIONS {
stats?: boolean;
webhooks?: {
shard: { id: string; token: string };
cluster: { id: string, token: string };
};
clientOptions?: eris.ClientOptions;
clusters?: number;
clusterTimeout?: number;
shards?: number;
firstShardID?: number;
lastShardID?: number;
debug?: boolean;
statsInterval?: number;
name?: string;
guildsPerShard?: number;
}
declare namespace Sharder {
export class Master {
constructor(token: string, path: string, options: OPTIONS, CLASS: any);
CLASS: any;
shardCount: number;
firstShardID: number;
lastShardID: number;
clusterCount: number;
clusterTimeout: number;
token: string | false;
clusters: Map<string | number, any>;
workers: Map<string | number, any>;
queue: Map<string | number, any>;
options: {
stats: boolean;
debug: boolean;
};
statsInterval: number;
mainFile: string;
name: string;
guildsPerShard: string;
webhooks: {
cluster: {
id: string;
token: string;
};
shard: {
id: string;
token: string;
};
};
clientOptions: Eris.ClientOptions;
callbacks: Map<any, any>;
stats: boolean;
isMaster(): boolean;
startStats(): void;
executeStats(): void;
start(clusterID?: number): void;
private launch(): void;
chunk(shards: any[], clusterCount: number): void;
private connectShards(): void;
private sendWebhook(type: string, embed: any): void;
printLogo(): void;
restartCluster(worker: number, code: number): void;
calculateShards(): Promise<number>;
fetchInfo(start: any, type: any, value: any): void;
broadcast(start: any, message: any): void;
sendTo(cluster: number | string, message: any): void;
};
class Base {
constructor(setup: { bot: any, clusterID: number; ipc: any });
restartCluster(clusterID: number): void;
};
};
export = Sharder;