seyfert 2.1.1-dev-12401435957.0 → 2.1.1-dev-12418439067.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.
@@ -194,7 +194,7 @@ class Cache {
194
194
  relationshipsData[hashId] = [];
195
195
  }
196
196
  relationshipsData[hashId].push(id);
197
- if (type !== 'overwrites') {
197
+ if (type !== 'overwrites' && type !== 'messages') {
198
198
  data.guild_id = guildId;
199
199
  }
200
200
  allData.push([this[type].hashId(id), this[type].parse(data, id, guildId)]);
@@ -264,7 +264,7 @@ class Cache {
264
264
  relationshipsData[hashId] = [];
265
265
  }
266
266
  relationshipsData[hashId].push(id);
267
- if (type !== 'overwrites') {
267
+ if (type !== 'overwrites' && type !== 'messages') {
268
268
  data.guild_id = guildId;
269
269
  }
270
270
  allData.push([this[type].hashId(id), this[type].parse(data, id, guildId)]);
@@ -1,3 +1,4 @@
1
+ import type { InternalRuntimeConfig, InternalRuntimeConfigHTTP } from '../../client/base';
1
2
  import type { Awaitable, DeepPartial, Logger } from '../../common';
2
3
  import type { APIGatewayBotInfo, GatewayDispatchPayload, GatewayIntentBits, GatewayPresenceUpdateData } from '../../types';
3
4
  import type { IdentifyProperties } from '../constants';
@@ -56,6 +57,7 @@ export interface WorkerManagerOptions extends Omit<ShardManagerOptions, 'handleP
56
57
  handlePayload?(shardId: number, workerId: number, packet: GatewayDispatchPayload): any;
57
58
  handleWorkerMessage?(message: WorkerMessages): any;
58
59
  properties?: DeepPartial<NonNullable<ShardManagerOptions['properties']>>;
60
+ getRC?(): Awaitable<InternalRuntimeConfig | InternalRuntimeConfigHTTP>;
59
61
  }
60
62
  export interface ShardData {
61
63
  /** resume seq to resume connections */
@@ -19,7 +19,7 @@ export declare class WorkerManager extends Map<number, (ClusterWorker | WorkerTh
19
19
  shardEnd: number;
20
20
  shardsPerWorker: number;
21
21
  }, logger?: Logger): number[][];
22
- options: PickPartial<Required<WorkerManagerOptions>, 'adapter' | 'handleWorkerMessage' | 'handlePayload'>;
22
+ options: PickPartial<Required<WorkerManagerOptions>, 'adapter' | 'handleWorkerMessage' | 'handlePayload' | 'getRC'>;
23
23
  debugger?: Logger;
24
24
  connectQueue: ConnectQueue;
25
25
  workerQueue: (() => void)[];
@@ -480,8 +480,9 @@ class WorkerManager extends Map {
480
480
  return Promise.all(promises);
481
481
  }
482
482
  async start() {
483
- const rc = await base_1.BaseClient.prototype.getRC();
484
- this.options.debug ||= rc.debug;
483
+ const rc = (await this.options.getRC?.()) ??
484
+ (await base_1.BaseClient.prototype.getRC());
485
+ this.options.debug ||= rc.debug ?? false;
485
486
  this.options.intents ||= rc.intents ?? 0;
486
487
  this.options.token ??= rc.token;
487
488
  this.rest ??= new __1.ApiHandler({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "2.1.1-dev-12401435957.0",
3
+ "version": "2.1.1-dev-12418439067.0",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",