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.
@@ -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;
@@ -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 => ('events' in x.locations ? x.locations.events : undefined));
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');
@@ -7,3 +7,7 @@ export * from './utils';
7
7
  * https://discord.com/developers/docs/reference#snowflakes
8
8
  */
9
9
  export type Snowflake = string;
10
+ /**
11
+ * https://discord.com/developers/docs/topics/permissions
12
+ */
13
+ export type Permissions = string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "2.1.1-dev-12316533544.0",
3
+ "version": "2.1.1-dev-12332218798.0",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",