mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
chore: upgrade deps (#10824)
This commit is contained in:
@@ -2,11 +2,11 @@ export * from './strategies/context/IContextFetchingStrategy.js';
|
||||
export * from './strategies/context/SimpleContextFetchingStrategy.js';
|
||||
export * from './strategies/context/WorkerContextFetchingStrategy.js';
|
||||
|
||||
export * from './strategies/sharding/IShardingStrategy.js';
|
||||
export type * from './strategies/sharding/IShardingStrategy.js';
|
||||
export * from './strategies/sharding/SimpleShardingStrategy.js';
|
||||
export * from './strategies/sharding/WorkerShardingStrategy.js';
|
||||
|
||||
export * from './throttling/IIdentifyThrottler.js';
|
||||
export type * from './throttling/IIdentifyThrottler.js';
|
||||
export * from './throttling/SimpleIdentifyThrottler.js';
|
||||
|
||||
export * from './utils/constants.js';
|
||||
|
||||
@@ -25,12 +25,10 @@ export class SimpleIdentifyThrottler implements IIdentifyThrottler {
|
||||
public async waitForIdentify(shardId: number, signal: AbortSignal): Promise<void> {
|
||||
const key = shardId % this.maxConcurrency;
|
||||
|
||||
const state = this.states.ensure(key, () => {
|
||||
return {
|
||||
queue: new AsyncQueue(),
|
||||
resetsAt: Number.POSITIVE_INFINITY,
|
||||
};
|
||||
});
|
||||
const state = this.states.ensure(key, () => ({
|
||||
queue: new AsyncQueue(),
|
||||
resetsAt: Number.POSITIVE_INFINITY,
|
||||
}));
|
||||
|
||||
await state.queue.wait({ signal });
|
||||
|
||||
|
||||
@@ -304,6 +304,7 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
|
||||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
if (!options.code) {
|
||||
options.code = options.recover === WebSocketShardDestroyRecovery.Resume ? CloseCodes.Resuming : CloseCodes.Normal;
|
||||
}
|
||||
@@ -704,7 +705,7 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
|
||||
this.replayedEvents++;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-nested-switch
|
||||
// eslint-disable-next-line sonarjs/no-nested-switch, @typescript-eslint/switch-exhaustiveness-check
|
||||
switch (payload.t) {
|
||||
case GatewayDispatchEvents.Ready: {
|
||||
this.#status = WebSocketShardStatus.Ready;
|
||||
|
||||
Reference in New Issue
Block a user