seyfert 2.1.1-dev-12316533544.0 → 2.1.1-dev-12332218798.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client/client.d.ts +1 -0
- package/lib/client/client.js +6 -1
- package/lib/types/index.d.ts +4 -0
- package/package.json +1 -1
package/lib/client/client.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare class Client<Ready extends boolean = boolean> extends BaseClient
|
|
|
23
23
|
setServices({ gateway, ...rest }: ServicesOptions & {
|
|
24
24
|
gateway?: ShardManager;
|
|
25
25
|
}): void;
|
|
26
|
+
get latency(): number;
|
|
26
27
|
loadEvents(dir?: string): Promise<void>;
|
|
27
28
|
protected execute(options?: {
|
|
28
29
|
token?: string;
|
package/lib/client/client.js
CHANGED
|
@@ -32,8 +32,13 @@ class Client extends base_1.BaseClient {
|
|
|
32
32
|
this.gateway = gateway;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
+
get latency() {
|
|
36
|
+
let acc = 0;
|
|
37
|
+
this.gateway.forEach(s => (acc += s.latency));
|
|
38
|
+
return acc / this.gateway.size;
|
|
39
|
+
}
|
|
35
40
|
async loadEvents(dir) {
|
|
36
|
-
dir ??= await this.getRC().then(x =>
|
|
41
|
+
dir ??= await this.getRC().then(x => x.locations.events);
|
|
37
42
|
if (dir) {
|
|
38
43
|
await this.events.load(dir);
|
|
39
44
|
this.logger.info('EventHandler loaded');
|
package/lib/types/index.d.ts
CHANGED